Often times when being hit by a plethora of connections, it is good to tally them all up and see if there is a specific locale that may be of questionable origin.

netstat -an | grep “ESTABLISHED” |awk ‘{print $5}’ |cut -d “:” -f1 |sort |uniq -c |sort -n

2 Responses to “Show How Many Connections Per IP”
  1. Alex Brandt says:

    I’m not a fan of wasting processes and an alternative is the following: `netstat -an | gawk ‘BEGIN { FS=”[ \t:]+” } /ESTABLISHED/ { print $6 }’ | sort | uniq -c | sort -n`.

Leave a Reply