zoukankan      html  css  js  c++  java
  • centos7启动iptables时报Job for iptables.service failed because the control process exited with error cod

    centos7启动iptables时报Job for iptables.service failed because the control process exited with error cod
    
    启动iptables:
    
     service iptables start
    报错如下:
    
    Job for iptables.service failed because the control process exited with error code. See "systemctl status iptables.service" and "journalctl -xe" for details.
    查看异常信息:
    journalctl -xe
    错误如下:
    
    Failed to start IPv4 firewall with iptables.
    解决办法
    因为centos7默认的防火墙是firewalld防火墙,不是使用iptables,因此需要先关闭firewalld服务,或者干脆使用默认的firewalld防火墙。
    
    因为这次报错的服务器是一台刚刚购买的阿里云服务器,所以在操作上忘记关闭默认防火墙的步骤了才导致浪费了些时间在这件事情上。
    
    关闭firewalld:
    
     
    systemctl stop firewalld
     
    systemctl mask firewalld
    使用iptables服务:
    
     
    #开放443端口(HTTPS)
     
    iptables -A INPUT -p tcp --dport 443 -j ACCEPT
     
     
     
    #保存上述规则
     
    service iptables save
     
     
     
    #开启服务
     
    systemctl restart iptables.service
    正常启动!!!!
  • 相关阅读:
    POJ 2991(线段树)
    UVa_1592
    紫书 -- 大整数类
    在结构体中添加成员函数/C++
    双向队列
    用埃氏筛法生成质数表
    poj 3687(拓扑排序)
    它们其实都是“图”-- 最小生成树
    最小生成树(MST, Minimum Spanning Tree)
    他们其实都是“图”--最短路
  • 原文地址:https://www.cnblogs.com/zengpeng/p/9547468.html
Copyright © 2011-2022 走看看