centos7.5防火墙相关命令

查看防火墙状态

systemctl status firewalld

开启防火墙

systemctl start firewalld

关闭防火墙

systemctl stop firewalld

开机禁用 

systemctl disable firewalld

开机启用

systemctl enable firewalld

查看当前firewall状态

firewall-cmd --state

重启firewall

firewall-cmd --reload

禁止开机启动

systemctl disable firewalld.service

查看已经开放的端口:

firewall-cmd --list-ports

开启端口

firewall-cmd --zone=public --add-port=80/tcp --permanent

你可能感兴趣的:(centos7.5防火墙相关命令)