查看防火墙状态

systemctl status firewalld  

开启指定端口

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

重启防火墙

sudo firewall-cmd --reload

开启防火墙

systemctl start firewalld.service

关闭防火墙

systemctl stop firewalld.service