一推网

当前位置: 首页 > 知识问答 > centos7怎么查看防火墙是否运行

知识问答

centos7怎么查看防火墙是否运行

2026-11-22 19:24:59 来源:互联网转载

本文操作环境:centos 7系统、Dell G3电脑。

centos7怎么查看防火墙是否运行

方法一:systemctl status firewalld 

防火墙的开启、关闭、禁用命令

(1)设置开机启用防火墙:systemctl enable firewalld.service

(2)设置开机禁用防火墙:systemctl disable firewalld.service

(3)启动防火墙:systemctl start firewalld

(4)关闭防火墙:systemctl stop firewalld

(5)检查防火墙状态:systemctl status firewalld 

示例如下:

方法二:firewall-cmd --state

查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall开机启动

推荐教程:《centos教程》

七

上一篇:windows键是哪个键

下一篇:图文详解Excel中XLOOKUP函数典型用法整理