Skip to content

Instantly share code, notes, and snippets.

@gtarun
Created April 16, 2020 11:31
Show Gist options
  • Save gtarun/bc5f0c27411336bc0fc6838b20eb9779 to your computer and use it in GitHub Desktop.
Save gtarun/bc5f0c27411336bc0fc6838b20eb9779 to your computer and use it in GitHub Desktop.
DDOS attack prevention
sudo apt-get install libapache2-mod-evasive
# edit Config
sudo nano /etc/apache2/mods-available/evasive.conf
sudo mkdir /var/log/mod_evasive
sudo chown :www-data /var/log/mod_evasive
sudo chmod 771 /var/log/mod_evasive
a2enmod evasive
Restart apache
Do dos attack with ab
ab -n 100000 -c 100 -k -H "Accept-Encoding: gzip, deflate" https://outgrow.co/
Check how many ip block
/var/log/mod_evasive# ls -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment