Our server is getting attacked by DDOS

Recently our gamez.mn server is getting attacked by ddos. In the first I didn't know what to do. So googled and found this page
http://www.topwebhosts.org/tools/apf-bfd-ddos-rootkit.php
in short it will install
APF - Firewall
BFD - Brute Force Detection
DDOS Deflate - DDoS Deflate for more detailed info 
http://www.mydigitallife.info/2007/12/13/prevent-and-stop-dos-or-ddos-attacks-on-web-server-ddos-deflate/
Rootkit - Rootkit Hunter

BFD and DDOS Deflate works great with APF so better install it over Iptables and then install others.

And after that I started banning IPs like 67 with 67 connection like that. As you can see 67 is not a IP. So it seems attacker hid ip or is it using ipv6? 

Then I've disabled ipv6 using this link.
http://www.g-loaded.eu/2008/05/12/how-to-disable-ipv6-in-fedora-and-centos/
 
It seems quite right now. Dunno what will happen next.

And Addition here is Apache Optimization tutorial
http://kb.liquidweb.com/apache-optimization/ useful for everyone.

One more important thing
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n | tail
this command will chek connections right now

Edit 1 Server still quite right now. It seems it was ipv6 ddos attack.
Another usefull link run ddos deflate with ipv6
http://www.webhostingtalk.com/showthread.php?t=899608
I've disabled ipv6 so this link won't need me right now.

EDIT 2 I Better not use BFD anymore. It just keeps banning random IPs, and can't detect original attacker. So am losing random visitors as it works and banns IPs

Comments

Popular posts from this blog

Set up RAID on Dell Poweredge 2850

How to implement Blueimp with Laravel 5

HackUB (Hackathon Ulaanbaatar) - Organizing event