现在的位置: 首页 > 综合 > 正文

IPTable

2014年02月18日 ⁄ 综合 ⁄ 共 665字 ⁄ 字号 评论关闭
RedHat机器
cat /etc/sysconfig/iptables
*filter
:INPUT ACCEPT [10276:1578052]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [13784:16761487]
-A INPUT -s 10.0.0.0/255.0.0.0 -i eth1 -j DROP
-A INPUT -s 172.16.0.0/255.240.0.0 -j DROP
-A INPUT -s 192.168.0.0/255.255.0.0 -i eth1 -j DROP #eth1 is interface to internet
# anti Sync Flood
-A FORWARD -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -m limit --limit 1/sec -j ACCEPT
# anti some port scan
-A FORWARD -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK RST -m limit --limit 1/sec -j ACCEPT
# anti ping of death
-A FORWARD -p icmp -m icmp --icmp-type 8 -m limit --limit 1/sec -j ACCEPT
COMMIT

chkconfig iptables on
以后每次启动iptables就会自动读取配置文件(/etc/sysconfig/iptables)
自动启动
或者是/etc/rc.d/init.d/iptables start手工启动
/etc/rc.d/init.d/iptables stop手工停止 
 

抱歉!评论已关闭.