Unit iptables.service could not be found

问题:查看防火墙状态时报错service iptables status

解决方案

  在CentOS 7或RHEL 7或Fedora中防火墙由firewalld来管理,当然你可以还原传统的管理方式,或则使用新的命令进行管理。本文中将还原传统的管理方式。

  cd /etc/sysconfig

  ls -l

  没有查看到iptables文件,但存在ip6tables-config和iptables-config,本文中的linux为CentOS 7.6 ,CentOS 7默认没有了iptables文件。

  安装iptables-services yum install iptables-services

  启动iptables systemctl enable iptables

        systemctl start iptables

  查看防火墙状态service iptables status

  关闭防火墙 service iptables stop

原文地址:https://www.cnblogs.com/chenxi-hxl/p/12364352.html

时间: 2024-11-09 07:11:43

Unit iptables.service could not be found的相关文章

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 sav

解决 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

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

CentOS7出现Unit iptables.service could not be found

CentOS7默认的防火墙不是iptables,而是firewalle. 出现此情况可能是iptables防火墙未安装. #停止firewalld服务 systemctl stop firewalld #禁用firewalld服务 systemctl mask firewalld 开启 systemctl unmask firewalld 安装iptables-services: yum install iptables-services 设置开机启动: systemctl enable ipt

Centos 设置iptables端口转发 “Unit iptables.service could not be found”错误

将端口80映射到8080 Centos6 iptables -t net -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080 service iptables save service iptables restart Centos7 yum install iptables-services systemctl enable iptables iptables -t net -A PREROUTING -p tcp --dpo

Linux_异常_02_Failed to restart iptables.service: Unit not found.

启动防火墙时出现: Failed to restart iptables.service: Unit not found. 解决方案: 1.https://stackoverflow.com/questions/24756240/how-can-i-use-iptables-on-centos-7

Loaded:loaded(/usr/lib/systemd/system/iptables.service;enabled)Active: inactive

[[email protected] ~]# service iptables start Redirecting to /bin/systemctl start  iptables.service [[email protected] ~]# /bin/systemctl start  iptables.service [[email protected] ~]# service iptables status Redirecting to /bin/systemctl status  ipt

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