首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

CentOS 防火墙配备 80端口

2012-07-19 
CentOS 防火墙配置 80端口看了好几个页面内容都有错,下面是正确方法:#/sbin/iptables -I INPUT -p tcp --d

CentOS 防火墙配置 80端口

看了好几个页面内容都有错,下面是正确方法:
#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT

然后保存:
#/etc/rc.d/init.d/iptables save

再查看是否已经有了:
[root@vcentos ~]# /etc/init.d/iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num? target???? prot opt source?????????????? destination????????
1??? ACCEPT???? udp? --? 0.0.0.0/0??????????? 0.0.0.0/0?????????? udp dpt:80
2??? ACCEPT???? tcp? --? 0.0.0.0/0??????????? 0.0.0.0/0?????????? tcp dpt:80
3??? RH-Firewall-1-INPUT? all? --? 0.0.0.0/0??????????? 0.0.0.0/0??????????

Chain FORWARD (policy ACCEPT)
num? target???? prot opt source?????????????? destination????????
1??? RH-Firewall-1-INPUT? all? --? 0.0.0.0/0??????????? 0.0.0.0/0

热点排行