CentOS 7 执行service iptables start出现redirecting to systemctl ...Failed to ...not loaded.

如果出现以下错误,好像说的是 版本高了,需要采用其他方式了

systemctl restart.service

其注意一下;systemctl restart.service 需要进行安装

知识来源于:https://www.jianshu.com/p/de069a89c4b8

1. 使用systemctl

systemctl [start|stop|restart|save|status] iptables.service

2. 安装iptables-services

切换到root用户下,执行:

yum install iptables-services
systemctl enable iptables.service //设置开机启动

之后就可以使用以下指令了:

service iptables [start|stop|restart|save|status]

作者:adXiang
链接:https://www.jianshu.com/p/de069a89c4b8
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

Linux 重启防火墙失败的更多相关文章

  1. Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

    linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...

  2. kali linux重启网卡失败:Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details. 问题排查

    linux菜鸡的时候,总是为了配置网络而烦恼,重启网卡的原因有很多,我这次是因为配置了固定IP[使用第三方工具连接]所以需要重启网卡,出现 Job for networking.service fai ...

  3. linux配置防火墙和重启防火墙

    1.在linux系统里面找到并打开编辑配置防火墙的文件,执行命令: vi /etc/sysconfig/iptables. 2.在上面打开的文件里面加入一下语句: -A INPUT -m state ...

  4. Linux配置防火墙,开启80端口、3306端口

    Linux配置防火墙,开启80端口.3306端口   起因是因为想使用Navicat连接一下数据库,发现连接不上 通过查阅许多资料和多次测试发现是因为防火墙没有配置3306端口 话不多说,开整,同理, ...

  5. Linux的防火墙iptables配置示例

    注:内容来自网络 一.关闭防火墙 1.重启后永久性生效: 开启:chkconfig iptables on 关闭:chkconfig iptables off 2.即时生效,重启后失效: 开启:ser ...

  6. linux设置防火墙

    这样其他主机还是无法访问我们的数据库,linux关闭防火墙,其他主机就可以访问了. 关闭防火墙:/etc/init.d/iptables  stop 开启防火墙:/etc/init.d/iptable ...

  7. [转帖]Linux firewalld 防火墙使用

    Linux firewalld 防火墙使用 2018-06-19 19:26:08 蚩尤后裔 阅读数 2101  收藏 更多 分类专栏: Linux   版权声明:本文为博主原创文章,遵循CC 4.0 ...

  8. centos 7 开启端口重启防火墙

    开启端口   firewall-cmd --zone=public --add-port=80/tcp --permanent   命令含义:   --zone #作用域   --add-port=8 ...

  9. Linux SendMail发送邮件失败诊断案例(三)

    一Linux服务器突然发送不出邮件,检查了很多地方都没有发现异常,检查/var/log/maillog发现如下具体信息: Apr 12 00:36:04 mylinux sendmail[4685]: ...

随机推荐

  1. 2017CCPC秦皇岛

    热身赛 B题 Smartphone: 大整数相乘 Time Limit: 1 Second Memory Limit: 65536 KBHelianthuswolf Co. Ltd. is a mul ...

  2. for循环+setTimeout的延迟操作

    例子: for (var i = 0; i < 5; i++) { setTimeout(function () { console.log(i); }, 100) } 上述代码,输出结果显而易 ...

  3. tp 在Nginx上各种404

    对于ThinkPHP的URL访问路劲如:http://域名/index.php/Index/BlogTest/read,原先的Nginx的是不支持的pathinfo路劲的,导致你在thinkPHP5上 ...

  4. java中的hachcode方法

    哈希表这个数据结构想必大多数人都不陌生,而且在很多地方都会利用到hash表来提高查找效率.在Java的Object类中有一个方法: public native int hashCode(); 根据这个 ...

  5. ArrayList 的实现原理

    ArrayList  是List接口的可变数组的实现.实现了所有可选列表的操作,并包括null值在内的所有元素.此类还提供了一些方法来操作内部用来存储列表的数组大小. ArrayList 的是实现: ...

  6. angular-应用

    什么是SPA 真正的 AngularJS 单页 Web 应用(single page web application,SPA) 一些基础概念 <html> 元素是 AngularJS 应用 ...

  7. spark源代码action系列-foreach与foreachPartition

    RDD.foreachPartition/foreach的操作 在这个action的操作中: 这两个action主要用于对每一个partition中的iterator时行迭代的处理.通过用户传入的fu ...

  8. 3、Android中Activity的跳转

    1.创建project         file->new->android application 依次填入应用名称.project名.包名 在project文件夹下找到src/com. ...

  9. HBase基本数据操作具体解释

    引言 本文档參考最新(截止2014年7月16日)的官方Ref Guide.Developer API编写. 全部代码均基于"hbase 0.96.2-hadoop2"版本号编写.均 ...

  10. PHP中用下标符号[]去读取字符串的逻辑

    PHP中 [(下标)] 符号不仅能够应用于数组和对象,还能够应用于字符串,假设不注意非常easy出错. 比方获取一个网络接口,正常情况下会返回一个数组结构的json,经过解析之后结果为: array( ...