N系统大全 - 最好的系统光盘下载网站!

当前位置:首页 > 系统教程 > Linux教程 > 详细页面

CentOS VPS如何打开80端口

时间:2015-06-24 来源:N系统大全

  你是否在使用云服务器的时候网站出现打不开的状况,那么多半是vps的80端口未打开或被封了,那么CentOS要如何打开vps 80端口呢?需要通过防火墙打开,具体的随小编一起来了解下吧。

CentOS VPS如何打开80端口

  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

  上面就是CentOS系统vps打开80端口的方法介绍了,很多人在开启80端口后不知如何查看,所以本文还介绍了vps 80端口的查看方法。

相关信息

  • Linux系统下tar压缩解压缩命令详解

    tar,是Linux系统的一个命令,非常好用!如果你对tar命令不甚了解的话,可以看看小编为大家整理的tar压缩解压缩命令详解。...

    2018/03/05

  • Linux下的crontab定时执行任务命令详解

    crontab命令主要用于设置周期性被执行的指令,今天小编将给大家详细讲解Linux下的crontab定时执行任务命令,有兴趣的伙伴可以阅读文章了解!...

    2018/03/05

系统教程栏目

栏目热门教程

人气教程排行

站长推荐

热门系统下载

公众号