Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.
/ ddos-deflate Public archive

Shell script blocking DDoS attacks. Not maintained since 2016

Notifications You must be signed in to change notification settings

Amet13/ddos-deflate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ddos-deflate

Shell script blocking DDoS attacks. Simplified fork of (D)DoS Deflate.

Not maintained since 2016.

Installation

sudo -i
cd /tmp
wget -q -O - https://raw.githubusercontent.com/Amet13/ddos-deflate/master/install.sh | bash

Setup config for example:

vim /usr/local/ddos-deflate/ddos-deflate.conf
NO_OF_CONNECTIONS=500
EMAIL_TO="[email protected]"
BAN_PERIOD=60
CUSTOM_PORTS=":80|:443:|:53|:21"
ENABLE_LOG=YES

Add your ignore IP's to ignore list:

vim /usr/local/ddos-deflate/ignoreip.list
127.0.0.1
192.168.0.1
1.1.1.1
2.2.2.2

Check:

bash /usr/local/ddos-deflate/ddos-deflate.sh
    724 127.0.0.1
    214 2.2.2.2
     59 3.3.3.3
...

Testing

Run ab from another computer:

[email protected] ~ $ ab -n 200000 -c 100 http://server-ip/

Check new IPTables rules on server:

iptables -t raw -L PREROUTING
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
DROP       all  --  192.168.0.100        anywhere

Check logs:

tail -1 /var/log/ddos-deflate.log
26/12/2015 [17:50:00] -- 192.168.0.100 blocked on 60 seconds

Check your inbox:

Subject: IP addresses banned on 26/12/2015 [17:50:02]

Banned the following IP addresses on 26/12/2015 [17:50:02]
From: hostname.tld (192.168.0.13)

192.168.0.100 with 4183 connections blocked on 60 seconds

Uninstallation

sudo -i
cd /tmp
wget -q -O - https://raw.githubusercontent.com/Amet13/ddos-deflate/master/uninstall.sh | bash

Why RAW table instead FILTER?

Original author

[email protected]

License

Artistic License 2.0

About

Shell script blocking DDoS attacks. Not maintained since 2016

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages