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

    有时候,在虚拟机(我用的是centos)上面开了服务,在外面访问不到,本机一切都正常,这时就应该想到防火墙。

    关闭防火墙:

    首先,我们要知道要关闭的可能还不少,有iptables,firewalld,selinux,下面一个个来关闭;

    a1、查看状态:systemctl status firewalld

    a2、关闭: systemctl stop firewalld(事实证明,只执行这个,重启之后是不行的,还必须执行systemclt disable firewalld)

    b1、查看selinux状态:getenforce

    b2、关闭:编辑文件 /etc/selinux/config,将selinux的值改成disable,然后重启生效(reboot)

    c1、查看iptables状态:systemctl status iptables

    c2、centos7 默认是使用firewalld作为防火墙,iptables是关闭状态,,若要关闭执行命令chkconfig iptables off(永久关闭)

  • 相关阅读:
    google搜索教程
    phoenix/stack-five
    phoenix/stack-four
    phoenix/stack-three
    phoenix/stack-one
    fork 在 Linux 内核里面的实现
    无文件执行 ELF
    glibc 堆内存管理杂记
    QOS shaping 知识要点
    QOS CQ
  • 原文地址:https://www.cnblogs.com/qstudy/p/Linux.html
Copyright © 2011-2022 走看看