1.任意运行一条iptables防火墙规则配置命令:
iptables -P OUTPUT ACCEPT
2.对iptables服务进行保存:
service iptables save
如果上述命令执行失败报出:The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
解决方法:
1. 关闭防火墙
systemctl stop firewalld
2. 安装或更新服务
yum install iptables-services
3. 启动iptables
systemctl enable iptables
4. 打开iptable
systemctl start iptables
5. 保存iptables服务
service iptables save
3. 重启iptables服务:
service iptables restart
此时就会出现 iptables文件