Sinisterly
How to protect against DDOS on VPS - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Design (https://sinister.li/Forum-Design)
+--- Forum: Web Design (https://sinister.li/Forum-Web-Design)
+--- Thread: How to protect against DDOS on VPS (/Thread-How-to-protect-against-DDOS-on-VPS)



How to protect against DDOS on VPS - Travis - 06-10-2015

These Denial Of Service attacks can be prevented easily by installing mod_evasive Similar to mo_security it's useful.
Run
Code:
sudo apt-get install libapache2-mod-evasive


Make the log directory

Code:
sudo mkdir /var/log/mod_evasive

Change the permissions
Code:
sudo chown www-data:www-data /var/log/mod_evasive/

Create the config file and configure it

Code:
sudo vi /etc/apache2/mods-available/mod-evasive.conf

Add the following to the file

Code:
<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>

Fix the email bug

Code:
sudo ln -s /etc/alternatives/mail /bin/mail/

Check to see if it's enabled

Code:
sudo a2enmod mod-evasive

Then restart apache

Code:
service apache2 restart



RE: How to protect against DDOS on VPS - Zodiac - 06-10-2015

Thanks for sharing! Biggrin


RE: How to protect against DDOS on VPS - Travis - 06-10-2015

(06-10-2015, 04:45 PM)Nath Wrote: Thanks for sharing! Biggrin

Welcome


RE: How to protect against DDOS on VPS - Kotomi - 08-11-2015

Clean tutorial and effective. Nice!


RE: How to protect against DDOS on VPS - Travis - 08-11-2015

(08-11-2015, 09:24 AM)Angel Wrote: Clean tutorial and effective. Nice!

Thank you


RE: How to protect against DDOS on VPS - Choopie - 08-11-2015

Well mr.coder this was a nice tutorial man