记一次Linux报错解决方案—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.
首先先关停Firewall
systemctl stop firewalld
systemctl disable firewalld
然后安装iptables-services
yum install -y iptables-services
然后启动iptables
systemctl restart iptables
systemc enable iptables
然后再运行这条命令就不会报错了
[root@localhost /]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@localhost /]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]