顶部右侧自定义内容
顶部左侧自定义内容
当前位置:首页 > > 正文

CentOS VPS如何打开80端口解决网站打不开的问题

作者:xiaoyun发布时间:2019-10-12 13:08分类: 浏览:794评论:0


导读: CentOS 防火墙开启80端口 #/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT #/s...

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

注意需要重启服务哦:执行service iptabels save 与 service iptables restart

端口查看方法:

vhost]# /etc/init.d/iptables status

Table: filter

Chain INPUT (policy ACCEPT)

num target prot opt source destination

1 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80

2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80

Chain FORWARD (policy ACCEPT)

num target prot opt source destination

Chain OUTPUT (policy ACCEPT)

num target prot opt source destination

标签:


排行