Created
April 16, 2020 11:31
-
-
Save gtarun/bc5f0c27411336bc0fc6838b20eb9779 to your computer and use it in GitHub Desktop.
DDOS attack prevention
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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