# iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
#>iptables-save >/etc/sysconfig/iptables
进行查看,#iptables -L
ACCEPT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 1/sec burst 5
ACCEPT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/RST limit: avg 1/sec burst 5
ACCEPT icmp -- anywhere anywhere icmp echo-request limit: avg 1/sec burst 5
再次进行查看syn连接:
[root@web ~]# netstat -an | grep SYN | awk \'{print $5}\' | awk -F: \'{print $1}\' | sort | uniq -c | sort -nr | more
20 10.92.10.220
1 125.43.36.199
明显SYN连接数已经下来了。