你是否在使用云服务器的时候网站出现打不开的状况,那么多半是vps的80端口未打开或被封了,那么CentOS要如何打开vps80端口呢?需要通过防火墙打开,具体的随小编一起来了解下吧。 CentOS防火墙开启80端口 #/sbin/iptables-IINPUT-ptcp--dport80-jACCEPT #/sbin/iptables-IINPUT-ptcp--dport22-jACCEPT 然后保存: #/etc/rc.d/init.d/iptablessave 注意需要重启服务哦:执行serviceiptabelssave与serviceiptablesrestart 端口查看方法: vhost]#/etc/init.d/iptablesstatus Table:filter ChainINPUT(policyACCEPT) numtargetprotoptsourcedestination 1ACCEPTtcp--0.0.0.0/00.0.0.0/0tcpdpt:80 2ACCEPTtcp--0.0.0.0/00.0.0.0/0tcpdpt:80 ChainFORWARD(policyACCEPT) numtargetprotoptsourcedestination ChainOUTPUT(policyACCEPT) numtargetprotoptsourcedestination 上面就是CentOS系统vps打开80端口的方法介绍了,很多人在开启80端口后不知如何查看,所以本文还介绍了vps80端口的查看方法。