centos7启动iptable服务错edirecting to /bin/systemctl status iptables.serviceUnit iptables.service could

编程入门 行业动态 更新时间:2024-10-11 01:10:04

centos7启动iptable服务错edirecting to /<a href=https://www.elefans.com/category/jswz/34/1765642.html style=bin/systemctl status iptables.serviceUnit iptables.service could"/>

centos7启动iptable服务错edirecting to /bin/systemctl status iptables.serviceUnit iptables.service could

当我们想要安装iptables的时候

执行命令:yum install -y iptables

输出:
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
epel                                                                                        | 4.7 kB  00:00:00     
extras                                                                                      | 2.9 kB  00:00:00     
mysql-connectors-community                                                                  | 2.6 kB  00:00:00     
mysql-tools-community                                                                       | 2.6 kB  00:00:00     
mysql57-community                                                                           | 2.6 kB  00:00:00     
os                                                                                          | 3.6 kB  00:00:00     
updates                                                                                     | 2.9 kB  00:00:00     
(1/3): epel/7/x86_64/updateinfo                                                             | 1.1 MB  00:00:00     
(2/3): epel/7/x86_64/primary_db                                                             | 7.0 MB  00:00:01     
(3/3): updates/7/x86_64/primary_db                                                          |  16 MB  00:00:01     
Package iptables-1.4.21-35.el7.x86_64 already installed and latest version
Nothing to do 

为什么会这样?
[root@VM-24-15-centos sysconfig]# service iptables status(再执行查看状态)

输出:
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.
 

因为在centos7后,负责管理防火墙的是firewalld

我们需要关闭并注销后再重新yum安装iptable与开启服务

systemctl stop firewalld---停止

systemctl mask firewalld---注销

然后重新安装

yum install -y iptables

 接下来就可以进行iptable的操作了

更多推荐

centos7启动iptable服务错edirecting to /bin/systemctl status iptables.serviceUnit ipta

本文发布于:2024-02-07 09:48:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1755896.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:edirecting   bin   iptable   systemctl   serviceUnit

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!