zoukankan      html  css  js  c++  java
  • centos7 Failed to start iptables.service: Unit not found 防火墙

    在CentOS 7或RHEL 7或Fedora中防火墙由firewalld来管理

    添加

    firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效)
    
    firewall-cmd --zone=public --add-port=1000-2000/tcp --permanent 

    重新载入

    firewall-cmd --reload

    查看

    firewall-cmd --zone=public --query-port=80/tcp

    删除

    firewall-cmd --zone=public --remove-port=80/tcp --permanent
    

    开启防火墙

    systemctl start firewalld.service
    

    关闭防火墙

    systemctl stop firewalld.service

    查看运行状态

    firewall-cmd --state //running 表示运行
    

      

     

  • 相关阅读:
    第八章
    第十章
    第九章
    第七章
    第六章
    第五章
    第四章心得
    第二章心得
    第三章心得
    第一章心得
  • 原文地址:https://www.cnblogs.com/songxuan/p/11212658.html
Copyright © 2011-2022 走看看