:: What is mod_evasive
mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. – zdziarski
:: How to install mod_evasive on cPanel / WHM
+ download and install
|
1 2 3 4 5 6 |
cd /usr/local/src
wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz
tar xzf mod_evasive_1.10.1.tar.gz
cd mod_evasive
apxs -cia mod_evasive20.c
/usr/local/cpanel/bin/apache_conf_distiller --update |
+ configure
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
vi /usr/local/apache/conf/includes/post_virtualhost_2.conf
# add these line
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 3600
DOSEmailNotify email@domain.tld
DOSSystemCommand "/usr/sbin/csf -d %s"
DOSLogDir "/var/lock/mod_evasive"
</IfModule> |
i used csf to blocked, you can use apf or other tools to blocked.
+ restarting httpd
|
1 |
/etc/init.d/httpd restart |
or you can use whm to restarting httpd.