开启防火墙:
systemctl start firewalld.service
开启3317端口
firewall-cmd --zone=public --add-port=3317/tcp --permanent
--firewall-cmd --zone=public(作用域) --add-port=3317/tcp(端口和访问类型) --permanent(永久生效)
重启防火墙,运行命令:
firewall-cmd --reload
查看端口号是否开启,运行命令:
firewall-cmd --query-port=3317/tcp;
关闭防火墙,运行命令:
systemctl stop firewalld.service
禁止防火墙开机自启,运行命令:
systemctl disable firewalld.service
查看防火墙状态:
firewall-cmd --get-active-zones