iptables 的位置 /etc/sysconfig/iptables
1.禁用firewalld 服务
systemctl mask firewalld
2.停止firewalld 服务
systemctl stop firewalld
3.安装iptables服务
yum -y install iptables-services
- 设置iptables 开机启动
systemctl enable iptables
5.启动iptables 服务
systemctl start iptables
- 编辑iptables配置文件
vi /etc/sysconfig/iptables #编辑防火墙配置文件