CentOS 7关闭系统默认防火墙

CentOS 7开始默认使用的是firewall作为防火墙,并非iptables。

一、检查防火墙是否运行

firewall-cmd --state

SSH执行以上命令,若提示 running 则表示正在运行,not running表示没有运行。

二、关闭防火墙

systemctl stop firewalld.service #停止firewall

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

SSH执行以上命令,关闭防火墙并取消开机自动启动。



转载内容请注明出处: 转载自V5.Net(原文:https://v5.net/LinuxBase/CentOS-7-Firewall-disabled.html