NETSTAT COMMANDS VIA SSH Print

  • 0

Note: this is from a clients ticket having questions about the netstat command via ssh

I use the netstat command in two different ways - "netstat -antpee" - without the quotes of course for micro IP connection reports and - "netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n" - which is for Macro management

netstat -antpee shows individual connections which is great for micro management and also indicates which port they are connected or trying to connect to.

netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n - shows all the connected IP's and the very first number in the line shows how many connections each IP is occupying.

In your example - the last few lines is: 41 108.27.17.30 - which indicates 41 connections from IP 108.27.17.30

Though the IP itself does not indicate malicious activity - one would wonder what the need for 41 connections is about.

Was this answer helpful?

« Back