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

错误信息如下:

[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
 
时间: 2024-10-05 04:48:38

CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load的相关文章

Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.

可能的原因: 1.http://blog.sina.com.cn/s/blog_4692ea0a0101jqhz.html 2.http://diag.5ustore.com/proxy/index.php?url=1J1h12y31F1b1918yLyByU1FyNyjyD101z1612yo1C1cyc1sy3yc1yyN161611yY0RyiyiyJyY1hymylyj1hyL1gyS1LyWyR1Myhyk0VyMylyvyg0j1j1D1F1k18171r1P1HyuyI1DyNyB

Failed to issue method call: Unit mysql.service failed to load: No such file or directory的解决办法

Failed to issue method call: Unit mysql.service failed to load: No such file or directory的解决办法 作者:chszs,转载需注明.博客主页:http://blog.csdn.net/chszs 1.软件环境: OpenSUSE 13.1 x64 MySQL 5.6.20 x64 2.采用RPM包安装MySQL 5.6.20 # rpm -ivh MySQL-server-5.6.20-1.sles11.x8

Failed to issue method call: Unit mysql.service failed to load: No such file or directory解决的方式

Failed to issue method call: Unit mysql.service failed to load: No such file or directory解决的方式 作者:chszs.转载需注明.博客主页:http://blog.csdn.net/chszs 1.软件环境: OpenSUSE 13.1 x64 MySQL 5.6.20 x64 2.採用RPM包安装MySQL 5.6.20 # rpm -ivh MySQL-server-5.6.20-1.sles11.x8

docker安装完报错:Failed to start docker.service: Unit docker.service is masked

执行 systemctl start docker 报错 Failed to start docker.service: Unit docker.service is masked. 解决 systemctl unmask docker.service systemctl unmask docker.socket systemctl start docker.service 原文地址:https://www.cnblogs.com/chenqionghe/p/11478863.html

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

使用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.&

解决 RHEL 7/ CentOS 7/Fedora 出现Unit iptables.service failed to load

防火墙配置后执行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 firewall

docker 无法启动,报错:Unit docker.socket failed to load: No such file or directory

问题:docker无法启动 错误:     Failed to start docker.service: Unit docker.socket failed to load: No such file or directory.      解决方法:     systemctl unmask docker.service     systemctl unmask docker.socket     systemctl start docker.service

Centos 的防火墙(firewalld,iptables)和开启启动

Centos系统防火墙介绍 Centos7以前的系统默认使用iptables服务来管理防火墙,Centos7系统及以后使用firewalld服务替代了iptables服务,但是依然可以使用iptables来管理内核的netfilter.其实iptables服务和firewalld服务都不是真正的防火墙,只是用来定义防火墙规则功能的管理工具,将定义好的规则交由内核中的netfilter(网络过滤器来读取)从而实现真正的防火墙功能. FireWalld服务 介绍: 工具名称:firewalld fi

centos下防火墙iptables日志学习笔记

一直找不到日志方面怎么弄,问了同事,同事给了个网址: http://www.thegeekstuff.com/2012/08/iptables-log-packets/ 下面就是我根据这个网址里面的设置自己实践的步骤以及自己的想法: 仔细看了一遍之后,感觉和以前玩的routeos的规则差不多: 1.就是先创建一个日志链 2.然后将所有的输入都跳转到这个日志链 3.然后就是记录日志链中drop调的数据 4.然后就是终止日志链 防火墙规则如下: iptables -N LOGGING iptable