see active connections

to see active connections (ip addresses) connected to port 80:

netstat -ntu | grep :80 | grep EST | awk ‘{print $5}’| sed ‘s/::ffff://’ | cut -d: -f1 | sort | uniq -c | sort -rn

easy enough to amend if you need to see which services are being used.

more examples to follow.

Leave a Reply

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