@H_404_3@1)查看80断开是否打开(肯定没打开)
@H_404_3@[root@centos5 conf]# iptables -L –n
@H_404_3@Chain INPUT (policy ACCEPT)
@H_404_3@targetprot opt sourcedestination
@H_404_3@RH-Firewall-1-INPUT all-- 0.0.0.0/0 0.0.0.0/0
@H_404_3@
@H_404_3@Chain FORWARD (policy ACCEPT)
@H_404_3@targetprot opt sourcedestination
@H_404_3@RH-Firewall-1-INPUT all-- 0.0.0.0/0 0.0.0.0/0
@H_404_3@
@H_404_3@Chain OUTPUT (policy ACCEPT)
@H_404_3@targetprot opt sourcedestination
@H_404_3@
@H_404_3@Chain RH-Firewall-1-INPUT (2 references)
@H_404_3@targetprot opt sourcedestination
@H_404_3@ACCEPTall -- 0.0.0.0/0 0.0.0.0/0
@H_404_3@ACCEPTicmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
@H_404_3@ACCEPTesp -- 0.0.0.0/0 0.0.0.0/0
@H_404_3@ACCEPTah -- 0.0.0.0/0 0.0.0.0/0
@H_404_3@ACCEPTudp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
@H_404_3@ACCEPTudp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
@H_404_3@ACCEPTtcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:631
@H_404_3@ACCEPTall -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
@H_404_3@ACCEPTtcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
@H_404_3@REJECTall -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
@H_404_3@2)修改文件/etc/sysconfig/iptables
@H_404_3@[root@centos5 conf]# vim/etc/sysconfig/iptables
@H_404_3@
@H_404_3@新增规则如下:
@H_404_3@-A RH-Firewall-1-INPUT -m state --state NEW-m tcp -p tcp --dport 80 -j ACCEPT
@H_404_3@3)重启iptalbes
@H_404_3@[root@centos5 conf]# service iptables restart
@H_404_3@4)再次查看
@H_404_3@Chain INPUT (policy ACCEPT)
@H_404_3@targetprot opt sourcedestination
@H_404_3@RH-Firewall-1-INPUT all-- 0.0.0.0/0 0.0.0.0/0
@H_404_3@
@H_404_3@Chain FORWARD (policy ACCEPT)
@H_404_3@targetprot opt sourcedestination
@H_404_3@RH-Firewall-1-INPUT all-- 0.0.0.0/0 0.0.0.0/0
@H_404_3@
@H_404_3@Chain OUTPUT (policy ACCEPT)
@H_404_3@targetprot opt sourcedestination
@H_404_3@
@H_404_3@Chain RH-Firewall-1-INPUT (2 references)
@H_404_3@targetprot opt sourcedestination
@H_404_3@ACCEPTall -- 0.0.0.0/0 0.0.0.0/0
@H_404_3@ACCEPTicmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
@H_404_3@ACCEPTesp -- 0.0.0.0/0 0.0.0.0/0
@H_404_3@ACCEPTah -- 0.0.0.0/0 0.0.0.0/0
@H_404_3@ACCEPTudp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
@H_404_3@ACCEPTudp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
@H_404_3@ACCEPTtcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:631
@H_404_3@ACCEPTall -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
@H_404_3@ACCEPTtcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
@H_404_3@ACCEPT tcp-- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:80
@H_404_3@REJECTall -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited