欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

centos7,iptables修改后无法保存 有大用

[root@kslk-es-faq ~]# 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.



在centos7上,经常修改了iptables规则后,重启后规则就没了。有些地方使用使用 iptables-save,然而并无卵用;
正确的保存操作是 service iptables save

$ 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.

说明没有安装 iptables-services

 yum install -y iptables-services

再次保存,成功后会给出提示信息:

$ service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]



如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页


来自 https://www.cnblogs.com/cosmos-wong/p/16563065.html


普通分类: