firewall-cmd --state 查看默认防火墙状态,关闭后显示notrunning,开启后显示running(如果防火墙开启则需要使用下面两条命令)
systemctl stop firewalld.service 停止防火墙(仅暂时有效,虚拟机重启后会自动开启)
systemctl disable firewalld.service 禁止防火墙开机启动
然后重启虚拟机,然后再输入第一条命令查看防火墙状态
转载自: https://blog.youkuaiyun.com/zhezhebie/article/details/72881393