use netstat to monitor your network connection

1. How many connections per IP?

netstat -nat | grep '^tcp' | sed -e 's/::ffff://gi' | 
sed -e 's/:::*/0.0.0.0:/gi' | tr ':' ' ' | 
awk '{ print $6 }' | sort | uniq -c | sort -n -r -k 1
Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.