CentOS 如何配置防火墙?

前端之家收集整理的这篇文章主要介绍了CentOS 如何配置防火墙?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Linux系统技术交流G群(2632018)验证问题答案:刘遄

<Linux就该这么学>G群

导读 本文主要讲解一下在Centos系统中配置防火墙,希望对大家有帮助。

防火墙的基本操作命令

1. 查询防火墙状态:

[root@localhost ~]# service iptables status

2. 开启防火墙:

[root@localhost ~]# service iptables start

2. 开启防火墙:

[root@localhost ~]# service iptables start

3. 关闭防火墙:

[root@localhost ~]# service iptables stop

4. 重启防火墙:

[root@localhost ~]# service iptables restart

5. 永久关闭防火墙:

[root@localhost ~]# chkconfig iptables off

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

[root@localhost ~]# chkconfig iptables off

补充

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

原文来自:http://www.centoscn.com/CentOS/config/2017/0520/8799.html

本文地址:http://www.linuxprobe.com/centos-firewall.html

原文链接:https://www.f2er.com/centos/377494.html

猜你在找的CentOS相关文章