Howto protect Linux server - Quick install fail2ban

Install fail2ban:

apt-get install fail2ban

Copy configuration file to right place:

cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

Edit configuration file

bantime  = 600 # = 10min (bigger = better)
banaction = iptables-allports

enabled  = true

enabled  = true

Restart service:

service fail2ban restart

Check iptables:

iptables -L -n

Log file:

LAMP server

If you alter your httpd.conf file to include the following two lines the presence, and version, of the PHP module will be hidden - as will the version of Apache you're using:
ServerSignature Off
ServerTokens production

/etc/init.d/apache2 reload

PHP is a fantastic language and is perfect for you dynamic mySQL driven site, but the flexibility of it at the same time makes it vulnerable for external expoits. Here are a few tips of how to secure your php.ini !

Edit our php.ini by logging into shell with root :
vim /usr/lib/php.ini

Subscribe to server