Howto Install mod_evasive

mod_evasive and mod_security modules are used to secure Apache Web Server from DDoS and brute force attacks by implementing web application firewall.

Download the source
tar -xzvf mod_evasive_1.10.1.tar.gz
cd mod_evasive

Compile in the mod_evasive apache module using apxs
For Apache 2
/usr/local/apache/bin/apxs -i -a -c mod_evasive20.c

For Apache 1.3
/usr/local/apache/bin/apxs -i -a -c mod_evasive.c

If the apxs path is not /usr/local/apache/bin/apxs replace it with the appropriate path

Edit your httpd.conf /usr/local/apache/conf/httpd.conf

Add the below lines:
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
Restart apcahe:

/etc/init.d/httpd restart



Both comments and pings are currently closed.

Comments are closed.