DDoS-Deflate Revisited
I recently had the task at work of setting up a simple DoS protection for our public web server. After poking around some bit, I settled on using DDoS-Deflate. We use Ubuntu 10.04 on our server and unfortunately, the script seems to have been last updated over 5 years ago and I needed some modifications to make it work in our environment. I also didn’t like the idea of the install script needing to download files from some web server and have packaged it up all in one (linked at the end of this post).
Some highlights of the changes made:
- Changed hash-bang from sh to bash shell (Ubuntu now points sh to dash, not bash)
- Added a few command line options
- remove-cron – Remove the CRON job
- dry-run – Run the script but don’t actually ban or log anything (helpful for testing what it would ban) - Changed the logic of the KILL option (setting KILL = 0 in the conf file is now the same thing as setting dry-run at the command line)
- Install and Uninstall scripts have been updated to move files locally instead of downloading. Uninstall uses the remove-cron command line option to remove the cron file.
- Emails can now come from a specified email address
- Updated netstat call to include a grep filter to only capture IP addresses and not the header lines of the netstat call.
Install and Uninstall is still pretty simple…
wget http://www.mattzuba.com/wordpress/wp-content/uploads/2011/02/ddos_deflate-0.7.tar.gz tar -xf ddos_deflate-0.7.tar.gz cd ddos_deflate-0.7 sudo ./install.sh
And to uninstall, just run this
sudo ./uninstall.sh
In accordance with the license this was originally released, all modifications may be considered public domain.
Download: DDoS-Deflate
| Print article | This entry was posted by Matt on February 18, 2011 at 10:51 am, and is filed under Linux. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 2 years ago
Thanks for doing this, as I need to run DDoS Deflate under Ubuntu.
I am getting a 404 error when trying to wget the file. Is it still available?
about 2 years ago
Sorry about that, I moved wordpress into it’s own directory and forgot to update some links. It should be okay now.
about 1 year ago
Good job , very substantial post for deflate and its usage nowdays in 2011.
tip: if u move out CAPTCHA code u will have more comments…
about 1 year ago
thank you very much, and then version 0.6 does not work = (
about 1 year ago
thank you very much. saved me lots of time modifying the out dated original version to run on my ubuntu box
about 9 months ago
This is great, thanks a lot. However the mail feature doesn’t work. How would we get this to work with sendmail? I’m using Ubuntu 10.04.
about 4 months ago
Is it working in Ubuntu Server 12.04?
about 3 months ago
not working under ubuntu 12.04
about 3 months ago
Hey. Someone a solution would not be able to work well on ubuntu 12.04?