CentOS 7 执行service iptables start出现redirecting to systemctl ...Failed to ...not loaded.

在centOS 7系统中运行

service iptables stop

发现出错

解决办法

1. 使用systemctl

systemctl [start|stop|restart|save|status] iptables.service

2. 安装iptables-services

切换到root用户下,执行:

yum install iptables-services
systemctl enable iptables.service //设置开机启动

之后就可以使用以下指令了:

service iptables [start|stop|restart|save|status]

 

posted @ 2020-02-12 12:54  hui1019  阅读(559)  评论(0编辑  收藏  举报