以下内容均为工作中整理
找出活跃的SYNC_REC netstat -n -p|grep SYN_REC | wc -l 使用netstat命令来计算每个IP地址对服务器的连接数量 watch -n 2 "netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n" 显示并且列出连接到80端口IP地址和连接数.80被用来作为HTTP (443端口同理) netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1 统计80端口连接数(443端口同理) watch -n 2 "netstat -an | grep :80 | grep ESTABLISHED" 统计所有连接到本机端口 watch -n 2 "netstat -ant |grep ESTABLISHED|wc -l" 拒绝此IP的所有连接 iptables -A INPUT 1 -s $IPADRESS -j DROP/REJECT
文章来源: https://blog.csdn.net/weixin_44335190/article/details/91353729