CentOS关闭防火墙

CentOS关闭防火墙

问题描述:在win10上的虚拟机上安装了centos7,并安装了flink,虚拟机curl localhost:8081能返回html结果,centos和windows能互相ping通,但是在windows上不能通过centos_ip:8081的方式访问flink webui

问题原因:没有关闭centos的防火墙,关闭防火墙的步骤

  1. 切换到root用户,命令su

    su
    
  2. 查看防火墙状态,命令systemctl status firewalld,看到active(running)表示防火墙正在运行

    systemctl status firewalld
    
  3. 关闭防火墙,命令systemctl stop firewalld,按照步骤2的命令查看状态,inactive(dead)表示防火墙关闭

    systemctl stop firewalld
    
  4. 以上是临时关闭防火墙的命令,永久关闭防火墙的命令 systemctl disable firewalld

    systemctl disable firewalld
    

备注:1. 开机启动防火墙命令,systemctl enable firewalld

​ 2.临时打开防火墙命令,systemctl start firewalld.

你可能感兴趣的:(操作系统,Centos,Linux,Javaweb,springboot)