Search This Blog

Ubuntu 12.04 Precise LTS: Install ModEvasive for Apache 2 web server

  1. sudo apt-get install libapache2-mod-evasive
  2. sudo mkdir /var/log/mod_evasive; sudo chown -R www-data:www-data /var/log/mod_evasive
  3. sudo vi /etc/apache2/mods-available/mod-evasive.conf
    <ifmodule mod_evasive20.c>
       DOSHashTableSize 3097
       DOSPageCount  2
       DOSSiteCount  50
       DOSPageInterval 1
       DOSSiteInterval  1
       DOSBlockingPeriod  10
       DOSLogDir   /var/log/mod_evasive
       DOSEmailNotify  EMAIL@DOMAIN.com
       DOSWhitelist   127.0.0.1
    </ifmodule>
  4. sudo a2enmod mod-evasive; sudo /etc/init.d/apache2 restart

No comments:

Post a Comment