web analytics

Install Mod_evasive to prevent DOS attacks

Version Installed :- 1.10.1


  1. cd /usr/local/src

  2. tar –xzvf mod_evasive_1.10.1.tar.gz

  3. cd mod_evasive/

  4. Take a backup of the apache conf, as it needs to be modified


cp –pv /usr/local/apache/conf/httpd.conf httpd.conf.beforeevasive_bak.$(date +%F)


  1. /usr/local/apache/bin/apxs –cia mod_evasive20.c

  2. Add the following to httpd.conf now from WHM-> Apache Configuration -> Include Editor -> Post Virtual Host Include


<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 5
DOSSiteCount 100
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 600


  1. Restart apache – /etc/rc.d/init.d/httpd restart

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>