一、安装iptable iptable-service
1.service iptables status //先检查是否安装了iptables
2.yum install -y iptables //安装iptables
3.yum update iptables //升级iptables(安装的最新版本则不需要)
4.yum install -y iptables-services //安装iptables-services
二、禁用/停止自带的firewalld服务
1. systemctl stop firewalld //停止firewalld服务
2.systemctl mask firewalld //屏蔽禁用firewalld服务,显示服务用 unmast
三、启用iptables
1.systemctl start iptables
2.systemctl enable iptables