See List of Connecting IP Addresses on Server

Below is an Linux command to list all the IP addresses connected to your server on port 80:

netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head

Below is an Linux command to list all the IP addresses connected to your server on port 2096 (cPanel webmail):

netstat -tn 2>/dev/null | grep :2096 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head

Leave a comment

BlogLogistics