|
发表于 2008-12-6 09:22:41
|
显示全部楼层
# Attention: To enable the commands below can cause some side effects
# Syn-flood and DOS protection
iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
# Port Scanners protection
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT
iptables -A FORWARD -p tcp --tcp-flags ALL SYN,ACK -j DROP
# Ping-of-dead protection
iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
# Speed UP DNS
iptables -t mangle -A OUTPUT -p udp --dport 53 -j TOS --set-tos 0x08
iptables -t mangle -A PREROUTING -p udp --dport 53 -j TOS --set-tos 0x10
# Speed UP HTTP
iptables -t mangle -A OUTPUT -p tcp -j TOS --sport 80 --set-tos 0x08
iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TOS --set-tos 0x08
iptables -t mangle -A OUTPUT -p tcp -j TOS --sport 80 --set-tos 0x10 |
|