Protect yourself from DOS attacks on Linux with mod_evasive

shape
shape
shape
shape
shape
shape
shape
shape

The following tutorial explains how to install the “mod_evasive” module for the Apache webserver on Debian,
which temporarily blocks the client in the event of several attempted connections to the server,
called a DOS attack.

Installation:

apt-get install libapache2-mod-evasive

Create a directory to store the mod_evasive logs

mkdir -p /var/log/apache2/evasive
chown -R www-data:root /var/log/apache2/evasive

Now add the configuration for the module by editing /etc/apache2/mods-available/mod-evasive.load

vi /etc/apache2/mods-available/mod-evasive.load

The file should look like this:

LoadModule evasive20_module /usr/lib/apache2/modules/mod_evasive20.so

DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 5
DOSSiteInterval 1
DOSBlockingPeriod 10
DOSLogDir “/var/log/apache2/evasive”

Restart the Apache server:

/etc/init.d/apache2 restart

Source: http://www.faqforge.com/linux/prevent-dos-attacks-on-apache-webserver-for-debian-linux-with-mod_evasive/

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest news

Latest news directly from our blog.