查看防火墙状态:firewall-cmd --state
[root@localhost bin]# firewall-cmd --state
running
running表示防火墙处于开启状态。
关闭防火墙:systemctl stop firewalld.service
[root@localhost bin]# systemctl stop firewalld.service
[root@localhost bin]# firewall-cmd --state
not running
not running表示防火墙处于关闭状态。
设置开机不启动防火墙:systemctl disable firewalld.service
启动防火墙:systemctl start firewalld.service