查看系统开放的端口
netstat -ntlp
查看防火墙是否开启
firewall-cmd --state
如果没开启,则启动防火墙
systemctl start firewalld.service
systemctl enable firewalld
另外,关闭命令是
systemctl stop firewalld.service
查看防火墙出入站规则
firewall-cmd --list-all
开放端口并重启防火墙
firewall-cmd --zone=public --add-port=8000/tcp --permanent
systemctl restart firewalld.service
查看已开放的端口信息
firewall-cmd --list-ports