2

Below is an Unix 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

— by Goeks1 on Sept. 26, 2018, 11:10 p.m.

Explanation

This command is useful to detect if your server is under attack, and null route those IPs. Read this null route attacker IP story.

Output:

 97 114.198.236.100
 56 67.166.157.194
 44 170.248.43.76
 38 141.0.9.20
 37 49.248.0.2
 37 153.100.131.12
 31 223.62.169.73
 30 65.248.100.253
 29 203.112.82.128
 29 182.19.66.187

Source: https://www.mkyong.com/linux/list-all-ip-addresses-connected-to-your-server/

Limitations

I think netstat is not a default package on Debian Stretch. You have to install net-tools

apt-get install net-tools