Tag: netstat

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

Tagged with: , ,
Top