开启
systemctl start firewalld
查看状态
systemctl status firewalld
关闭
systemctl stop firewalld
查看开放端口
firewall-cmd --list-all
设置开放的端口号(之后要重启防火墙)
firewall-cmd --add-service=http --pemanent
firewall-cmd --all-port=80/tcp --permanent
重启防火墙
firewall-cmd --reload