'Mod-Evasive' provides evasive action in the event of an HTTP DoS or DDoS attack or brute force attack.
Follow the below steps to install Mod_Evasive on the server
1. Change the root directory to cd /opt
2. Download the source code of mod-evasive
wget
http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz3. unzip
tar -xvf mod_evasive_1.10.1.tar.gz
4. cd mod_evasive
5.Install httpd-devel
yum install httpd-devel
6.Run the below command to compile
apxs -cia mod_evasive20.c
7.Add the following rules to Apache /etc/httpd/conf/httpd.conf
DOSHashTableSize 3097
DOSPageCount 6
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600
8.Restart apache
/etc/init.d/httpd restart