查看已经开放的端口:
firewall-cmd –list-ports
开启端口:
firewall-cmd –zone=public –add-port=8080/tcp –permanent
关闭端口:
firewall-cmd –permanent –zone=public –remove-port=8080/tcp
开启防火墙:
systemctl start firewalld
重启防火墙:
firewall-cmd –reload #重启
firewall systemctl stop firewalld.service #停止
firewall systemctl disable firewalld.service #禁止firewall开机启动
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/281866.html