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. div纵向居中的方法(转载)

    方法一这个方法把一些 div 的显示方式设置为表格,因此我们可以使用表格的 vertical-align property 属性. <div id="wrapper"> ...

  2. scrollBot滚动条美化,niceScroll有滚动条错位得问题

    http://www.htmleaf.com/Demo/201706204585.html

  3. mySql 使用 SQL 文件脚本 failed to open file 注意事项

    1.路径不要有中文,其实最好是全英文 2.路径可以有空格 3.路径两头不要加引号 4.作为一个MySQL命令,source C:/lib/a.sql; 后边的分号是要的. 5.使用 unix 路径风格 ...

  4. Centos7下安装Mongodb

    Mongodb网盘路径:链接:https://pan.baidu.com/s/1rWJCPZ59EAW25ha1UF5czw 密码:u3zq 1.把安装包上传到linux服务器上,解压,然后我们把mo ...

  5. PHP内置SOAP扩展客户端的使用例子

    SOAP已经是属于OUT范畴的技术了,不过因为历史原因,时不时还是会用到它,以前都是用NuSOAP,现在准备试试PHP内置的SOAP扩展.由于文本只打算说说客户端的用法,所以得先找一些能直接用的服务端 ...

  6. Android开发新手HelloWorld解析

    首先看这个 HelloWorld 类. Java代码public class HelloWorld extends Activity {       /** Called when the activ ...

  7. 2015 Multi-University Training Contest 7 hdu 5372 Segment Game

    Segment Game Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Tota ...

  8. 百度 谷歌 Twitter,这么多短链接服务(Short Url)究竟哪家强?

    一.短链接是什么 url=HPqdQ5VR3vA39x7ZWoWyNzwWnsDhTbh66BTpdzsJLroBDzFRm4JV-G818Zc027uZrwe7zxtxnD4H2FUahftpUK& ...

  9. inputstream输出为String

    import java.io.IOException; import java.io.InputStream; import org.apache.http.HttpEntity; import or ...

  10. JAVA性能优化的五种方式

    一,JAVA性能优化之设计优化 设计优化处于性能优化手段的上层.它往往须要在软件开发之前进行.在软件开发之前,系统架构师应该就评估系统可能存在的各种潜在问题和技术难点,并给出合理的设计方案,因为软件设 ...