跳到主要内容
帮助中心

新闻公告

产品更新、运营公告与行业观察
一手消息,第一时间同步给你

云服务器Centos中配置防火墙具体方法

防火墙的基本操作命令

1. 查询防火墙状态:

[root@localhost ~]<span style="color: #57a64a;font-style: italic;line-height: 26px"># service iptables status</span>

2. 开启防火墙:

[root@localhost ~]<span style="color: #57a64a;font-style: italic;line-height: 26px"># service iptables start</span>

3. 关闭防火墙:

[root@localhost ~]<span style="color: #57a64a;font-style: italic;line-height: 26px"># service iptables stop</span>

4. 重启防火墙:

[root@localhost ~]<span style="color: #57a64a;font-style: italic;line-height: 26px"># service iptables restart</span>

5. 永久关闭防火墙:

[root@localhost ~]<span style="color: #57a64a;font-style: italic;line-height: 26px"># chkconfig iptables off</span>

6. 永久关闭后开启防火墙:

[root@localhost ~]<span style="color: #57a64a;font-style: italic;line-height: 26px"># chkconfig iptables off</span>

补充

编辑/etc/sysconfig/iptables文件,可以配置不同端口的对外提供服务。


本文链接
返回本栏目
工单