zoukankan      html  css  js  c++  java
  • 3.centos 7执行service iptables save报错问题

    1.报错  

    [root@localhost ~]# 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.

    2.无法执行的原因是/etc/sysconfig/iptables 这个文件还没有生成呢。需要升级iptables。  

    [root@localhost ~]# systemctl stop firewalld
    systemctl stop 
    
    [root@localhost ~]# yum install iptables-services.x86_64 
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
     * base: mirror.bit.edu.cn
     * extras: mirrors.huaweicloud.com
     * updates: mirrors.huaweicloud.com
    ... ... 
    Installed:
      iptables-services.x86_64 0:1.4.21-34.el7                                                              
    
    Complete!

    [root@localhost ~]# systemctl enable iptables Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
    [root@localhost
    ~]# systemctl start iptables [root@localhost ~]# service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
  • 相关阅读:
    day003|python基础回顾3
    14Linux之网络管理
    13Linux之磁盘管理
    12Linux之进程管理
    11Linux之软件包管理
    10Linux之用户权限管理
    09Linux之文件管理
    08Linux之目录结构
    07Linux之bash解释器交互式环境特性
    06Linux之shell介绍
  • 原文地址:https://www.cnblogs.com/xinghen1216/p/13741157.html
Copyright © 2011-2022 走看看