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

 2022-05-03    557  

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

查看方法:1、利用systemctl查看,该命令用于管理系统,语法为“systemctl status firewalld”;2、用firewall查看,可以查看防火墙的默认状态,语法为“firewall-cmd --state”。

本文操作环境:centos 7系统

方法一:

systemctl status firewalld

1.jpg

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

(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

2.jpg

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

以上就是centos7怎么查看防火墙是否运行的详细内容,更多请关注服务器技术网其它相关文章!

原文链接:https://77isp.com/post/873.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。