Ban IP on server level after a number of unsuccessful logins

August 24, 2008
Filed under Linux, Server Management

This is a widely used function amongst the server managers. Depending on your system configuration, the server will ban the enforcer’s IP, either putting it in the firewall’s deny list or, on Linux servers with IPTables installed, will put the IP in the drop list.
To achieve this feature, the easiest way is [...]

Read the whole article »

Restrict access to directory or domain by IP, using .htaccess

August 2, 2008
Filed under .htaccess

I don’t blah too much on this subject.
Basically, you can restrict or allow who can connect to your site or who can access specific directories using .htaccess .
Here’s the code to block one specific IP, I use 192.168.0.1 to block, you replace it with the IP you want to deny.

order allow,deny
deny from 192.168.0.1
allow from [...]

Read the whole article »