Check the most IP connect to server Print

  • 0

netstat -an | sort +4 | grep :80 | awk '{print $5}' | sed -e s/':.*'/''/g | sort | uniq -c | sort -k 1 -nr | head -n 20

or

netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

or

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

Was this answer helpful?

« Back