zoukankan      html  css  js  c++  java
  • centos .7x service iptables save 错误解决方案

    保存转发规则的时候,发现service iptables save 无效,而且报错
    [root@localhost bin]# 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.产生这个问题的原因是iptables的服务没有安装

    关闭防火墙

    #停止firewall
    systemctl stop firewalld.service

    #禁止firewall开机启动
    systemctl disable firewalld.service

    #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
    firewall-cmd --state

    安装iptables服务
    安装完成iptables后,在使用service iptables save方法就没有问题了

    #安装或更新服务
    yum install iptables-services

    #启用iptables
    systemctl enable iptables

    #启动iptables
    systemctl start iptables 打开iptables

    [root@localhost ~]# service iptables save
    iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]

     


    ————————————————
    版权声明:本文为CSDN博主「狂飙的yellowcong」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/yelllowcong/article/details/78229862

  • 相关阅读:
    软件工程团队作业2.1——《业务流程模型》
    软件工程团队作业1——《调研提纲》
    2020软件工程第四次作业
    作业四(一)
    17074230 团队项目选题报告
    计算与软件工程 作业5
    计算与软件工程 作业4
    17074230 第三次作业
    17074230 第二次作业
    17074230 赵雅雅 第一次作业
  • 原文地址:https://www.cnblogs.com/Mercury-linux/p/11619650.html
Copyright © 2011-2022 走看看