Installing mod_dosevasive on Apache 1.3 and FreeBSD
What is mod_dosevasive?
mod_dosevasive 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. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and etcetera. mod_dosevasive presently reports abuses via email and syslog facilities.
fetch http://www.nuclearelephant.com/projects/dosevasive/mod_dosevasive_1.10.t...
tar zxvf mod_dosevasive.tar.gz
cd dosevasive/
/usr/local/sbin/apxs -i -c mod_dosevasive.c
vi /usr/local/apache/conf/httpd.conf
Add the following to your httpd.conf file:
LoadModule dosevasive_module libexec/apache/mod_dosevasive.so
AddModule mod_dosevasive.c
<ifmodule mod_dosevasive.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
</ifmodule>
Restart apache:
apachectl configtest
apachectl graceful
Test it:
chmod 0700 ./test.pl
./test.pl
If it works the status code should change from 200 to 403 after some requests:
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
....
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
...
Post new comment