zoukankan      html  css  js  c++  java
  • CentOS关闭防火墙

    CentOS 6版本

    查询防火墙状态:

    [root@localhost ~]# service   iptables status<回车>

    停止防火墙:

    [root@localhost ~]# service   iptables stop <回车>

    启动防火墙:

    [root@localhost ~]# service   iptables start <回车>

    重启防火墙:

    [root@localhost ~]# service   iptables restart <回车>

    永久关闭防火墙:

    [root@localhost ~]# chkconfig   iptables off<回车>

    永久关闭后启用:

    [root@localhost ~]# chkconfig   iptables on<回车>

    CentOS 7版本

    [root@rhel7 ~]# systemctl list-unit-files|grep enabled

    禁用防火墙

    [root@rhel7 ~]# systemctl stop firewalld.service
    [root@rhel7 ~]# systemctl disable firewalld.service
    [root@rhel7 ~]# systemctl status firewalld.service

    启动一个服务:systemctl start firewalld.service
    关闭一个服务:systemctl stop firewalld.service
    重启一个服务:systemctl restart firewalld.service
    显示一个服务的状态:systemctl status firewalld.service
    在开机时启用一个服务:systemctl enable firewalld.service
    在开机时禁用一个服务:systemctl disable firewalld.service
    查看服务是否开机启动:systemctl is-enabled firewalld.service;echo $?
    查看已启动的服务列表:systemctl list-unit-files|grep enabled

  • 相关阅读:
    第二阶段冲刺--每日立会(6)
    第二阶段冲刺--每日立会(5)
    第十六周进度表
    第十五周进度表
    梦断代码阅读笔记之六
    梦断代码阅读笔记之五
    梦断代码阅读笔记之四
    梦断代码阅读笔记之三
    梦断代码阅读笔记之二
    梦断代码阅读笔记之一
  • 原文地址:https://www.cnblogs.com/xxsl/p/6519138.html
Copyright © 2011-2022 走看看