注意:CentOS7以上
firewall-cmd –state
--启动 、关闭、重启防火墙
systemctl start firewalld.service
systemctl stop firewalld.service
systemctl restart firewalld.service
--开启/查看端口(开启端口需重启防火墙)
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --list-port