需关闭firewalld防火墙:

systemctl stop firewalld.service

systemctl disable firewalld.service

安装iptables服务:

yum install iptables-services

保存iptables规则:

service iptables save

配置iptables开机启动:

systemctl enable iptables.service
(老版本命令为:service iptables on)