分类: LINUX
2011-02-11 11:03:08
#防止SYN攻击 轻量级预防
iptables -N syn-flood
iptables -A INPUT -p tcp –syn -j syn-flood
iptables -I syn-flood -p tcp -m limit –limit 3/s –limit-burst 6 -j RETURN
iptables -A syn-flood -j REJECT
#防止DOS太多连接进来,可以允许外网网卡每个IP最多15个初始连接,超过的丢弃
iptables -A INPUT -i eth0 -p tcp –syn -m connlimit –connlimit-above 15 -j DROP
iptables -A INPUT -p tcp -m state –state ESTABLISHED,RELATED -j ACCEPT