美文网首页
CentOS 如何配置防火墙?

CentOS 如何配置防火墙?

作者: Linux大师 | 来源:发表于2023-07-31 09:29 被阅读0次

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

防火墙的基本操作命令

1. 查询防火墙状态:

[root@localhost ~]# service iptables status

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文件,可以配置不同端口的对外提供服务。

文章来源:https://www.linuxprobe.com/centos-firewall.html

相关文章

网友评论

      本文标题:CentOS 如何配置防火墙?

      本文链接:https://www.haomeiwen.com/subject/sxdepdtx.html