Skip to content

Instantly share code, notes, and snippets.

@naavveenn
Last active May 12, 2018 06:02
Show Gist options
  • Save naavveenn/09d30aa639925f0e9e984115c13b9085 to your computer and use it in GitHub Desktop.
Save naavveenn/09d30aa639925f0e9e984115c13b9085 to your computer and use it in GitHub Desktop.
Mod_Evasive is an open source evasive maneuvers system for Apache server to provide evasive action in the event of an HTTP brute force, Dos or DDos attack. It was designed to use as a network traffic detection and network management tool and can be easily configured and integrated into firewalls, ipchains, routers etc. Presently, it sends abuses…
Step1:- Installing Dependencies
yum install gcc make
yum install libxml2 libxml2-devel httpd-devel pcre-devel curl-devel
Step2:--
cd /usr/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
Step3:--
By default installation adds the following line of mod_evasive configuration to your Apache configuration file.
Please verify that it should be there like similar to below. If you can’t see this below line, then add this to your httpd.conf file.
LoadModule evasive20_module /usr/lib/httpd/modules/mod_evasive20.so
Now add the mod_evasive configuration parameters to your Apache configuration at the end.
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 60
</IfModule>
Next restart the Apache service to update changes.
/etc/init.d/httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment