zoukankan      html  css  js  c++  java
  • firewalld

    使用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.”错误,在CentOS 7或RHEL 7或Fedora中防火墙由firewalld来管理,当然你可以还原传统的管理方式。或则使用新的命令进行管理。

    假如采用传统请执行一下命令:

    systemctl stop firewalld
    systemctl mask firewalld


     

    并且安装iptables-services:

    yum install iptables-services


    设置开机启动:

    systemctl enable iptables
    
    systemctl [stop|start|restart] iptables
    #or
    service iptables [stop|start|restart]
     
    
    service iptables save
    #or
    /usr/libexec/iptables/iptables.init save

    从上面的解决办法来看这个是防火墙没有启动了,iptables防火墙服务未启动导致的哦。

  • 相关阅读:
    Vasya and Endless Credits CodeForces
    Dreamoon and Strings CodeForces
    Online Meeting CodeForces
    数塔取数 基础dp
    1001 数组中和等于K的数对 1090 3个数和为0
    1091 线段的重叠
    51nod 最小周长
    走格子 51nod
    1289 大鱼吃小鱼
    POJ 1979 Red and Black
  • 原文地址:https://www.cnblogs.com/shabake/p/6742110.html
Copyright © 2011-2022 走看看