How to mitigate DOS atacks with DOS-Deflate
What is DOS-Deflate?
(D)DoS Deflate is a shell script developed by Zaf, originally for use on MediaLayer servers to assist in combating denial of service attacks. However, it was seen to be very effective for our purpose, and therefore was released as a contribution to the web hosting community. (D)DoS Deflate is now used by not only many web hosts, but by many people who run their own servers looking for additional security in dealing with such attacks.
How to install
Installing DOS-Deflate is one of the simplest out there.
- Login to your server as root
- Download the install script
- Run the installer
wget http://www.inetbase.com/scripts/ddos/install.sh
sh install.sh
DOS-Deflate should now be installed.
Please note that DOS-Deflate uses APF to ban IPs so you must have it installed for DOS-Deflate to work properly. I guide on how to install APF can be found here.
Customizing DOS-Deflate is very easy. You have to edit /usr/local/ddos/ddos.conf with your favorite editor for example
pico /usr/local/ddos/ddos.conf
Every setting is explained in the configuration file so I will not go over them as the explanations are quite easy to fallow up.
If you run into any problems please leave a comment here and I’ll try to help out.
If you enjoyed this post, make sure you subscribe to my RSS feed!
- September 21st

















Hi,
just wanted to say thanks so much for this post. Installed the script on all our servers and have noticed a HUGE improvement in brute attack alerts, and HUGE improvements in server performance.
Special thanks to the script writer too
We recommend this script to anyone with their own server/VPS
Many thanks again,
Lisa @ popuserve.info
dosdeflate is a nice script. It works very well and works great in combination with apf firewall.