$ netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head ExplanationThis command is useful to detect when your server is under attack, and block those IPs. Output:
Source: https://www.mkyong.com/linux/list-all-ip-addresses-connected-to-your-server/ |