Prevent and Stop DoS or DDoS Attacks on Web Server (D)DOS-Deflate

All web servers been connected to the Internet subjected to DoS (Denial of Service) or DDoS (Distrubuted Denial of Service) attacks in some kind or another, where hackers or attackers launch large amount connections consistently and persistently to the server, and in advanced stage, distributed from multiple IP addresses or sources, in the hope to bring down the server or use up all network bandwidth and system resources to deny web pages serving or website not responding to legitimate visitors.

There are plenty of ways to prevent, stop, fight and kill off DDoS attack, such as using firewall. A low cost, and probably free method is by using software based firewall or filtering service. (D)DoS-Deflate is a free open source Unix/Linux script by MediaLayer that automatically mitigate (D)DoS attacks. It claims to be the best, free, open source solution to protect servers against some of the most excruciating DDoS attacks.

(D)DoS-Deflate script basically monitors and tracks the IP addresses are sending and establishing large amount of TCP network connections such as mass emailing, DoS pings, HTTP requests) by using “netstat” command, which is the symptom of a denial of service attack. When it detects number of connections from a single node that exceeds certain preset limit, the script will automatically uses APF or IPTABLES to ban and block the IPs. Depending on the configuration, the banned IP addresses would be unbanned using APF or IPTABLES (only works on APF v 0.96 or better).

Installation and setup of (D)DOS-Deflate on the server is extremely easy. Simply login as root by open SSH secure shell access to the server, and run the the following commands one by one:

wget http://www.inetbase.com/scripts/ddos/install.sh
chmod 0700 install.sh
./install.sh

To uninstall the (D)DOS-Deflate, run the following commands one by one instead:

wget http://www.inetbase.com/scripts/ddos/uninstall.ddos
chmod 0700 uninstall.ddos
./uninstall.ddos

The configuration file for (D)DOS-Deflate is ddos.conf, and by default it will have the following values:

FREQ=1
NO_OF_CONNECTIONS=50
APF_BAN=1
KILL=1
EMAIL_TO=”root”
BAN_PERIOD=600

Users can change any of these settings to suit the different need or usage pattern of different servers. It’s also possible to whitelist and permanently unblock (never ban) IP addresses by listing them in /usr/local/ddos/ignore.ip.list file. If you plan to execute and run the script interactively, users can set KILL=0 so that any bad IPs detected are not banned.


4 Responses to “Prevent and Stop DoS or DDoS Attacks on Web Server (D)DOS-Deflate”

  1. kintes
    October 31st, 2009 19:38
    4

    Great!
    http://www.mydigitallife.info

  2. Tech Freek
    April 8th, 2009 16:49
    3

    I really doubt this will work against high Attacks.
    I guess opting for any third party Anti DDOS service will be better.

  3. Code4Gold
    March 30th, 2009 09:38
    2

    Great information. There is a DDOS running right now of mostly South American IP’s. Somebody must have put a trojan on spanish language sites.

  4. 13 Tips to Protect Your Wordpress Blog | Thewirds
    March 9th, 2009 13:20
    1

    [...] My Digital Life [...]

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

how to prevent DDoS - how to stop DDOS attacks - prevent ddos - iptables ddos - ddos deflate - iptables dos - how to stop ddos - prevent ddos attack - how to stop DoS attacks - how to stop a DDOS attack - stop ddos attack - how to prevent ddos attacks - ddos iptables - how to stop dos attack - how to stop ddos attack - iptables ddos attack - ddos.conf - how to prevent ddos attack - stop dos attack - how to prevent a ddos attack - stop ddos - (D)DoS-Deflate - how to prevent dos attacks - dos iptables - stopping ddos attacks - anti ddos iptables - DDoS-Deflate - how to stop dos - kill ddos atacks - iptables dos attack - linux stop DDoS - stopping a DDoS - stopping ddos - how to stop a dos attack - wget http://www.inetbase.com/scripts/ddos/install.sh - stopping dos attacks - Can anything be done to stop DDOS attacks - DOS-Deflate - Mitigate (DDOS attacks Banned the following ip addresses on connections - ways to prevent dos attack - how to prevent a dos attack - dos-deflate - block ddos iptables - apf ddos - ddos deflate commands - prevent ddos attacks - stop dos attacks - Windows Firewall Script block DDOS - ddos stop - iptables dos - iptables DoS protect webserver -