Portal Home > Knowledgebase > Security > Quick check for a ddos via number of connections


Quick check for a ddos via number of connections




A quick and usefull command for checking if a server is under ddos is:

netstat -anp |grep 'tcp|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

That will list the IPs taking the most amount of connections to a server. It is important to remember that the ddos is becoming more sophisticated and they are using fewer connections with more attacking ips. If this is the case you will still get low number of connections even while you are under a DDOS.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
General Security (Views: 1195)
Mod_evasive (Views: 1485)