Linux Redirecting to /bin/systemctl restart iptables.service

方案 一

1.昨天碰到一个错误,linux下输入命令:service iptables restart时,
总会报下面一个提示
很简单,这句话的意思就是让你重定向到systemctl然后再启用,白话就是说用systemctl方式启动

解决方法:输入 systemctl start iptables
这个时候表示防火墙已经启动了,你在通过公网访问公网IP:8080就会出现一个小猫头像了

方案二

执行如下命令

systemctl stop firewalld
systemctl mask firewalld
安装iptables-service

yum install iptables-services
设置开机启动

systemctl enable iptables
systemctl stop iptables
systemctl start iptables
systemctl restart iptables
systemctl reload iptables
保存设置

service iptables save
欧克,在执行一下 service iptables start    应该就没有问题了

方案 三

Redirecting to /bin/systemctl restart iptables.service
1,安装systemctl:

yum install iptables-services
2,设置开机启动:

systemctl enable iptables.service
然后就可以执行以下指令了:

systemctl stop iptables
systemctl start iptables
systemctl restart iptables

原文地址:https://www.cnblogs.com/Rivend/p/11980329.html

时间: 2024-07-29 20:21:08

Linux Redirecting to /bin/systemctl restart iptables.service的相关文章

安装和启动tftp-server服务器及可能出现Redirecting to /bin/systemctl restart xinetd.service问题的解决方式

1)首先,检查服务器已安装的tftp-server        使用命令:rpm -qa | grep tftp-server        如果存在已安装的tftp这里会列出来 2)安装tftp-server 和 xinetd        使用如下的命令,进行相应服务的安装:        $yum -y install tftp-server        $yum -y install xinetd 3)修改tftp配置文件    使用如下命令:        $vi /etc/xin

阿里云报错Redirecting to /bin/systemctl restart sshd.service

转:http://blog.csdn.net/caijunfen/article/details/70599138 云服务器 ECS Linux CentOS 7 下重启服务不再通过 service  操作,而是通过 systemctl 操作. 查看:systemctl status sshd.service 启动:systemctl start sshd.service 重启:systemctl restart sshd.service 自启:systemctl enable sshd.ser

CentOS7+Nginx设置Systemctl restart nginx.service服务

centos 7上是用Systemd进行系统初始化的,Systemd 是 Linux 系统中最新的初始化系统(init),它主要的设计目标是克服 sysvinit 固有的缺点,提高系统的启动速度.关于Systemd的详情介绍在这里. Systemd服务文件以.service结尾,比如现在要建立nginx为开机启动,如果用yum install命令安装的,yum命令会自动创建nginx.service文件,直接用命令 1 systemcel enable nginx.service 设置开机启动即

Linux下mysql使用systemctl restart mysqld命令失败

Linux下mysql使用systemctl restart mysqld命令失败: 解决方法:将mysql赋予root的权限 vim /etc/passwd 找到mysql开头的一行文件mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/false !!!这里注意27这个数字和后面的文件路径每个人都不一样,只需要修改一个地方:把第一个27更改为0.修改为mysql:x:0:27:MySQL Server:/var/lib/mysql:/bin/fals

linux虚拟机出现See 'systemctl status network.service' and 'journalctl -xn' for details.的原因

博主之前也是突然遇到linux没有eth0网卡,重新cp了写了配置但是也没有用,反而有一个莫名其妙的报错 See 'systemctl status network.service' and 'journalctl -xn' for details. 而且再去读eth0会提示file not found 然后尝试重新添加删除网卡 没法重新发现 突然想到会不会是驱动的原因,想到了这个地方 这个是vmware的一个智能设置,他会根据你的ISO自动给你推荐分类的vmware tools,但是博主的IS

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

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

mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.

-bash-4.2# service mysqld restart Redirecting to /bin/systemctl restart mysqld.serviceFailed to restart mysqld.service: Unit not found. 并不存在 mysqld 的服务, -bash-4.2# -bash-4.2# chkconfig -list -list: unknown option -bash-4.2# chkconfig --list Note: Thi

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