centOS7 /etc/sysconfig/ 找不到iptables 解决方法

配置防火墙规则

1、[root@localhost ~]# iptables -P OUTPUT ACCEPT

2、[root@localhost ~]#service iptables save

(1)到这里,如果出现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

[root@localhost ~]#systemctl stop firewalld

[root@localhost ~]#yum install iptables-services

然后等待,完成后

[root@localhost ~]#systemctl enable iptables
[root@localhost ~]#systemctl start iptables

现在,你可以save了,重复1、2、

















你可能感兴趣的:(Linux)