linux iptables导致httpd网页打不开(转帖)

linux iptables导致httpd网页打不开
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://taotao1240.blog.51cto.com/731446/611758

  问题:httpd 服务已启动,80端口已开,但是网页就是打不开,重启服务器还是不行

忽然想看看log,记录如下:

[Fri Jul 15 00:41:03 2011] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0

[Fri Jul 15 00:41:03 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Fri Jul 15 00:41:03 2011] [notice] Digest: generating secret for digest authentication …

[Fri Jul 15 00:41:03 2011] [notice] Digest: done

[Fri Jul 15 00:41:03 2011] [notice] Apache/2.2.3 (CentOS) configured — resuming normal operations

看到 suexec,明白了,果断iptables -L ,结果如下:

ACCEPT     all  —  anywhere             anywhere

ACCEPT     icmp —  anywhere             anywhere            icmp any

ACCEPT     esp  —  anywhere             anywhere

ACCEPT     ah   —  anywhere             anywhere

ACCEPT     udp  —  anywhere             224.0.0.251         udp dpt:mdns

ACCEPT     udp  —  anywhere             anywhere            udp dpt:ipp

ACCEPT     tcp  —  anywhere             anywhere            tcp dpt:ipp

ACCEPT     all  —  anywhere             anywhere            state RELATED,ESTABLISHED

ACCEPT     tcp  —  anywhere             anywhere            state NEW tcp dpt:ssh

REJECT     all  —  anywhere             anywhere            reject-with icmp-host-prohibited

 

全部干掉,iptables -F ,再打开网页,显示正常

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>