Home Linux Scripts

Emergency DOS or DDOS stopping script for Linux

by

in Linux, Scripts

DDOS Attack

Click to view in Original size.

If you are under a DOS or DDOS attack and running out of your mind or don’t know what to do, use this script to get ride of this panic situation.

DoS or DDoS is an attempt to make a victim website unavailable by creating hundreds to hundreds thousands of established connections that overflow victim resources and makes a website unavailable to the genuine users/visitors.

Short and useful slide that definite this script can be view on slideshare

You can run script to mitigate a low level ddos attack some how while and can stop DOS attack completely. This script is available under GPL license from the author.

How to mitigate DoS or DDoS attack?

Stop or flush other rules for now :

service apf stop
iptables -F
wget http://www.hackersgarage.com/wp-content/uploads/2011/08/antiDDoS.txt
mv antiDDoS.txt antiDDoS.sh
chmod u+x antiDDoS.sh
./antiDDoS.sh

Some other useful commands to analyze the type of attacks :

netstat -antp | grep ESTABLISHED
netstat -antp | grep -i sync
netstat --help

If you are still not able to mitigate the attack, we can help you! 😀 at tips@hackersgarage.com

Related Posts:

andrie

master, may i know?
can this script stoped tcp and udp flooding?

thks

Silentplay3r

Andrie,

This is included in the script and would limit it.

iptables -N SYN_FLOOD
iptables -A INPUT -p tcp --syn -j SYN_FLOOD
iptables -A SYN_FLOOD -m limit --limit 2/s --limit-burst 6 -j RETURN
iptables -A SYN_FLOOD -j DROP

andrie

thks bro,

this code more good we used before someone DDOS our server, right?

Silentplay3r

Hi Andrie

Yes, you can use it any time.

amit

how to unistall it ??

Previous post:

Next post: