centos7用命令关闭防火墙

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_41948075/article/details/102242581

centos7用命令关闭防火墙


今天要安装Navicat,先关闭centos的防火墙,但是报错了。。
service iptables stop
Redirecting to /bin/systemctl stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.

#service iptables status
Redirecting to /bin/systemctl status iptables.service
iptables.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
后来知道原来centos7的防火墙不是这样关的。

参考Redhat Linux 7 命令关闭防火墙

使用systemctl即可解决

systemctl stop firewalld # 关闭防火墙

systemctl status firewalld # 查看防火墙状态

systemctl disable firewalld # 永久关闭防火墙,重启后,防火墙不会自动启动

systemctl enable firewalld # 开启防火墙

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_41948075/article/details/102242581
今日推荐