关闭防火墙
systemctl status firewalld 查看防火墙状态
systemctl stop firewalld 实时关闭防火墙
systemctl disable firewalld 永久禁用防火墙,禁止开机自启动
关闭SELinux
vim /etc/selinux/config
SELINUX=permissive #修改为disabled
reboot 重启服务器生效
防止客户启动防火墙后导致SSH连不上,对SSH端口31703放行
systemctl start firewalld
firewall-cmd --zone=public --add-port=31703/tcp --permanent
firewall-cmd --reload
systemctl stop firewalld
systemctl disable firewalld
如需关闭防火墙端口放行,则执行下面命令
firewall-cmd --zone=public --remove-port=31703/tcp --permanent