Linux iptables开启80端口

Linux下安装好apache的时候 
测试apache 监听的端口80
#netstat -lnt |grep 80
tcp        0      0 :::80                      :::*                        LISTEN  
安装成功了!


想到用本机telnet IP 80

不通- -  但是telnet IP 22  通了 ~ ~

可能是80端口没开放。
于是 开启80端口

1、开启80端口命令:/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
2、保存配置 命令:/etc/rc.d/init.d/iptables save

3、重启服务命令 :/etc/rc.d/init.d/iptables restart
4、查看已经开放的端口: /etc/init.d/iptables status

posted @ 2015-05-14 13:53  panf  阅读(1404)  评论(0编辑  收藏  举报