zoukankan      html  css  js  c++  java
  • 解决service iptables save出错please try to use systemctl

      

    # service iptables save
    The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

    出错信息如上所示

    解决方案:

    首先停止防火墙

    systemctl stop firewalld
    systemctl mask firewalld

    然后安装iptables-services

    yum install iptables-services

    设置开机启动防火墙

    systemctl enable iptables

    可以使用下面命令管理iptables

    systemctl [stop|start|restart] iptables

    这时可以保存防火墙规则了

    service iptables save
    or
    /usr/libexec/iptables/iptables.init save

     如果你之后要使用firewall的话:

      执行命令,即可实现取消服务的锁定

      # systemctl unmask firewalld

      下次需要锁定该服务时执行

      # systemctl mask firewalld

  • 相关阅读:
    SpringMvc---Ant通配符
    mybatis 数据库语句
    shiro 静态页面资源不显示 解决方案
    http错误汇总
    关于代码质量与逻辑
    shiro 过滤属性的意义
    java思维导图
    E
    LCIS HDU
    E
  • 原文地址:https://www.cnblogs.com/feiquan/p/9404779.html
Copyright © 2011-2022 走看看