Install mod_evasive on WHM/Cpanel

What is evasive module ?

mod_evasive is an Apache module which provide DDoS attack or brute force attack protection. It is also designed to for detection and network management and can be easily configured to talk to firewalls, routers and iptables security.It send mail for abuses and also have ability to add iptables entry and drop the packets for an ip.

If you have CSF firewall in your WHM/Cpanel then that firewall also have functionality for brute force protection but this tool is basically for web based brute force attackers so it makes higher security to your server as well.

Steps to install mod_evasive on WHM/Cpanel and configure it with apache

Above step will compile module with apache and make an entry in your apache configuration. Once it will complete you will get a message like –

[activating module `evasive20' in /usr/local/apache/conf/httpd.conf]

4. Your module has been added but it’s not configured yet so need to configure also. Include configuration file in your main apache configuration. This below configuration should be below of your loaded module line.

Include "/usr/local/apache/conf/includes/mod_evasive.conf"

5. Now you have to distill your apache configuration so this configuration will not remove with your next rebuild/upgrade.

linuxtweaks ~]# /usr/local/cpanel/bin/apache_conf_distiller --update

6. Now you need to create a configuration file which you have defined in apache conf

Ablout LinuxTweaks

Welcome to Linuxtweaks – the blog contains a lot of useful information for Linux System administrator ,newbies who are going to start there career as Linux System admin and also for linux desktop users. We basically share what we are getting issue on daily bases.We started this blog on November 2014 because we wanted to keep our knowledge on one place for future uses and also for sharing our knowledge with others on the basic of Linux technologies.