Display the Count of TCP Connections By IP Address

From HowToGeek

Jump to: navigation, search

If you've ever wondered how many connections a specific IP address has open to your server, you can run this sweet little command to see every IP Address with a total connections count next to it.

netstat -plan | grep :80 | awk '{print $5}' | awk -F: '{print $1}' | sort | uniq -c