1、禁用firewall
需要停止 firewalld 服务,并将其设置为在启动时不自动启动。
1)检查防火墙状态
sudo systemctl status firewalld
2)停止并禁用它
sudo systemctl stop firewalld
sudo systemctl disable firewalld
2、安装iptables
1)安装iptables
sudo yum install iptables-services
2)启动iptables防火墙
systemctl start iptables.service
3)设置开机自动启动
systemctl enable iptables.service
4)检查iptables状态
sudo systemctl status iptables