netstat one liners

Active over port 80

netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1

 

Sorted by type

netstat -plant | awk '{print $6}' | sort | uniq -c | sort -n

Posted in centos, malicious attacks.