Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Install Mod_evasive  (Read 4887 times)

0 Members and 1 Guest are viewing this topic.

rohitj

  • Guest
Install Mod_evasive
« on: October 26, 2013, 05:00:19 pm »
Install Mod_evasive

mod_evasive is an evasive maneuvers module for Apache that provides evasive action in the event of an HTTP DoS attack or brute force attack.  If there is too many connections from an ip the offending ip will be blocked.

You can follow the steps listed below to install this module.

========
cd /opt
wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz
tar -xvf mod_evasive_1.10.1.tar.gz
cd mod_evasive
=========

Now if you are running Apache 1.3.x you need to execute the following.


 /usr/local/apache/bin/apxs -cia mod_evasive.c
If you are on Apache 2.x.x issue the following command.

 /usr/local/apache/bin/apxs -cia mod_dosevasive20.c
Restart httpd.

/etc/rc.d/init.d/httpd restart

Done. Now we can go to the configuration part.

If you are on Apache 1.3.x, add the following to the httpd.conf AddModule section:

<IfModule mod_evasive.c>
 DOSHashTableSize 3097
 DOSPageCount 2
 DOSSiteCount 50
 DOSPageInterval 2
 DOSSiteInterval 2
 DOSBlockingPeriod 300
 </IfModule>

If you are on Apache 2.x.x just scroll to below the LoadModule section in the httpd.conf and add the following:

 <IfModule mod_evasive20.c>
 DOSHashTableSize 3097
 DOSPageCount 2
 DOSSiteCount 50
 DOSPageInterval 2
 DOSSiteInterval 2
 DOSBlockingPeriod 300
 </IfModule>
Save and exit. Restart httpd.

/etc/rc.d/init.d/httpd restart