1、安装防火墙
yum install firewalld systemd -y
2、查看已经开放的端口:
firewall-cmd –list-ports
3、开放端口
firewall-cmd –zone=public –add-port=80/tcp –permanent
4、查看firewalld状态
systemctl status firewalld
5、重启防火墙:
systemctl reload firewalld
6、开启防火墙
systemctl start firewalld
7、关闭防火墙
systemctl stop firewalld