centos7 默认防火墙是firewalld 所以查看防火墙状态命令:systemctl status firewalld.service
执行后可以看到绿色字样标注的“active(running)”,说明防火墙是开启状态
使用命令:systemctl stop firewalld.service 关闭运行的防火墙
关闭后,使用命令systemctl status firewalld.service 查看防火墙状态
防火墙关闭完成,设用xshell工具连接
设置永久关闭防火墙,输入命令“systemctl disable firewalld.service”,即可永久禁止防火墙服务,下次重启也不会开启。
原文连接:https://www.php.cn/centos/445632.html