Centos7.6:
systemctl stop firewalld.service
systemctl disable firewalld.service
其它端口修改8080为指定即可
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
检查端口映射
firewall-cmd --list-all
Ubuntu 18.04:
sudo ufw stop
sudo ufw disable
添加8080端口
sudo ufw allow 8080/tcp
重载防火墙
sudo ufw reload