Preventing DoS attacks before they become a problem
I came across this little gem not to long back which is handy.
It basically blocks IPs depending on the amount of connections they have. The defaults are fairly reasonable at 150 connections, and its remarkably easy to install.
chmod 0700 install.sh
Presto, now its installed! If you want to customize it then check in /usr/local/ddos/ddos.conf and edit it a bit.
Uninstall is just as easy
chmod 0700 uninstall.ddos