CentOS 7 (Liunx)防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load

导读:本篇文章讲解 CentOS 7 (Liunx)防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com

摘要


博主在倒腾服务器配置禅道的时候遇到的CentOS 7 防火墙问题。


错误信息如下:

[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 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

最后

  • 更多参考精彩博文请看这里:《陈永佳的博客》

  • 喜欢博主的小伙伴可以加个关注、点个赞哦,持续更新嘿嘿!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/97512.html

(0)
小半的头像小半

相关推荐

极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!