CentOS 防火墙配置 80端口
2008-10-15 15:20
573 查看
看了好几个页面内容都有错,下面是正确方法:
#/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
....
#/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
....
相关文章推荐
- CentOS 防火墙配置 80端口
- CentOS 7 防火墙配置80端口访问
- CentOS+Nginx 防火墙配置80 端口
- CentOS 7.0-配置防火墙,开启80、3306端口 7fe0
- Linux(CentOS6.8) 开放80端口3306端口6379端口,配置防火墙命令
- Linux Centos firewall 防火墙 开启 80 端口配置案例
- CentOS 防火墙 配置80端口
- centos下配置防火墙端口失败
- CentOS 配置防火墙操作实例(启、停、开、闭端口)
- centos 7 防火墙和端口配置
- CentOS 配置防火墙操作实例(启、停、开、闭端口)
- Centos7防火墙快速开放端口配置方法
- CentOS 配置防火墙操作实例(启、停、开、闭端口)
- CentOS 6.5系统中iptables防火墙开放端口80 3306 22端口
- CentOS 配置防火墙操作实例(启、停、开、闭端口)
- linux,Centos 6.3 yum安装Nginx+php+Mysql,配置防火墙,开启,关闭端口命令
- CentOS 配置防火墙操作实例(启、停、开、闭端口)
- CentOS 配置防火墙操作实例(启、停、开、闭端口):
- CentOS项目实例之九--防火墙端口配置
- Centos配置防火墙 开启80端口、3306端口的方法