还在苦苦敲代码开发APP?你out啦! 试试积木搭建APP吧~

[解决] RHEL 7/ CentOS 7/Fedora 出现Failed to start iptables.service: Unit iptables.service failed to load

来源:个人博客     2016-08-15 14:00:41    人气:     我有话说( 0 人参与)

错误信息如下:[root]# service iptables startRedirecting to bin systemctl start iptables.serviceFailed to start iptabl...

错误信息如下:
[root]# service iptables start
Redirecting to /bin/systemctl start  iptables.service
Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory.
解决方法如下:

一直用CentOS 6 习惯了,一下没适应过来。防火墙配置后执行service iptables save 出现”Failed to restart iptables.service: Unit iptables.service failed to load: No such file or directory.”错误,在CentOS 7或RHEL 7或Fedora中防火墙由firewalld来管理,当然你可以还原传统的管理方式。或则使用新的命令进行管理。

假如采用传统请执行一下命令:

systemctl stop firewalld
systemctl mask firewalld

并且安装iptables-services:

yum install iptables-services

设置开机启动:

systemctl enable iptables


iptables启动、关闭、保存:

systemctl [stop|start|restart] iptables
#or
service iptables [stop|start|restart]


service iptables save
#or
/usr/libexec/iptables/iptables.init save

CentOS RHEL Fedora iptables

本文源自互联网,采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可,
版权归原作者,如有问题请联系service@tsingfun.com (编辑:admin)
分享到: