9 06 2010

DDos - Deflate

bigCat Posted in Linux - Comment.isNotBlank

http://deflate.medialayer.com/\r\n

\r\n
\r\n

History

\r\nMediaLayer was in need of a script to automatically mitigate (D)DoS attacks. The necessity started when MediaLayer was the target of a rather large, consistent attack originating from multiple IP addresses. Each IP would have a large amount of connections to the server, as shown as by:\r\nnetstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n\r\nIt became a general practice for us to be blocking IPs with a large amount of connections, but we wanted to get this automated. Zaf created a script mitigate this kind of attack. We kept improving it to meet our own needs and eventually posted it on Defender Hosting's Forum. (D)DoS-Deflate is now recognized as one of the best ways to block a (D)DoS attack at the software level.\r\n

License Agreement

\r\nYou can view a copy of the license agreement here.\r\n

Installation

\r\nwget http://www.inetbase.com/scripts/ddos/install.sh\r\nchmod 0700 install.sh\r\n./install.sh\r\n\r\n

Uninstalling

\r\nwget http://www.inetbase.com/scripts/ddos/uninstall.ddos\r\nchmod 0700 uninstall.ddos\r\n./uninstall.ddos\r\n\r\n

Version 0.6 | Change Log

\r\n

    \r\n
  • whitelisting possible by adding IPs in /usr/local/ddos/ignore.ip.list
  • \r\n

  • it uses this file to avoid banning the ip again (it was handling this differently and was a bit slower too)
  • \r\n

\r\n

Version 0.6 | Upgrade Procedure

\r\nIt remains the same as last time (uninstall and reinstall the script), and you need to make changes to the conf to suit your preferences (The default values ban an ip with 150 connections (or more) for 600 seconds and run the script every minute)\r\n

Contacting Us

\r\nTo get in touch with us you may simply e-mail zaf@vsnl.com.\r\n\r\n

\r\n

Host: (miao) | Word: Press | Code: HTML5