View the number of liunx connections

Statistically connected, the status is "established
netstat -na|grep ESTABLISHED|wc -l

to find out which IP address has the most connections and block it.
netstat -na|grep ESTABLISHED|awk {print $5}|awk -F: {print $1}|sort|uniq -c|sort -r +0n

netstat -na|grep SYN|awk {print $5}|awk -F: {print $1}|sort|uniq -c|sort -r +0n

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326846889&siteId=291194637