Fail2ban is a software used to ban IP’s which shows strange behavior. It can be configured to reject IP’s for a certain amount of time.
To install Fail2ban we need to download the application from the source. Login as the root user and go to /opt
$ cd /opt
$ wget http://downloads.sourceforge.net/project/fail2ban/fail2ban-stable/fail2ban-0.8.4/fail2ban-0.8.4.tar.bz2?use_mirror=transact
Next unzip the downloaded file
$ tar -xf fail2ban-0.8.4.tar.bz2
$ cd fail2ban-0.8.4