我有一个Redhat服务器(Red Hat Enterprise
Linux Server 7.2(Maipo)),它在re / boot上重置了iptable规则.
根据version 6 documentation,我执行:
/sbin/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.
如果我正确理解了消息,我尝试了以下方法:
sudo systemctl iptables save
返回:
Unknown operation 'iptables'.
我没有具体在保存IP表上找到version 7 documentation,但以前的版本支持相同的命令.
What command should I run to save iptables config?
以供参考:
防火墙d satatus:
systemctl status firewalld firewalld.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)
解决方法
你应该安装iptables-services包.
然后服务iptables保存将工作.这些命令也可以工作:
# iptables-save > /etc/sysconfig/iptables # ip6tables-save > /etc/sysconfig/ip6tables
AFAIK,systemctl没有任何保存iptables-services配置的选项.
注意:systemctl语法如下:systemctl< operation> <单元>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。