centos7怎么查看防火墙状态

发布时间:2021-08-17 12:35 来源:亿速云 阅读:0 作者:chen 栏目: 服务器 欢迎投稿:712375056

本篇内容介绍了“centos7怎么查看防火墙状态”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

查看防火墙开启状态

[root@localhost scripts]# firewall-cmd --state
not running

查看开启服务:

[root@localhost conf.d]# systemctl list-unit-files |grep enabled
auditd.service                                enabled 
autovt@.service                               enabled 
crond.service                                 enabled

查看要关闭的防火墙服务

[root@localhost conf.d]# systemctl list-unit-files |grep firewalld
firewalld.service                             disabled

disabled 是关闭,如果开启,请关闭

systemctl disable firewalld

防火墙开关机

启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld

免责声明:本站发布的内容(图片、视频和文字)以原创、来自本网站内容采集于网络互联网转载等其它媒体和分享为主,内容观点不代表本网站立场,如侵犯了原作者的版权,请告知一经查实,将立刻删除涉嫌侵权内容,联系我们QQ:712375056,同时欢迎投稿传递力量。