百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>服务器> CentOS 7告iptables防火墙提示Unit iptables.service failed to
分享文章到:

CentOS 7告iptables防火墙提示Unit iptables.service failed to

发布时间:01/15 来源: 浏览: 关键词:
使用CentOS 7时发现使用iptables防火墙时提示错误Unit iptables.service failed to load,意思是防火墙运行启动失败了,那么要如何处理呢。

一直用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

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

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

从上面的解决办法来看这个是防火墙没有启动了,iptables防火墙服务未启动导致的哦。

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有3人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板