目录
[root@localhost ~]# firewall-cmd --zone=public --list-port 9876/tcp 8090/tcp 80/tcp 8080/tcp [root@localhost ~]# firewall-cmd --zone=public --add-port=3307/tcp --permanent success [root@localhost ~]# firewall-cmd --reload success [root@localhost ~]# firewall-cmd --zone=public --list-port 9876/tcp 8090/tcp 80/tcp 8080/tcp 3307/tcp
[root@localhost ~]# firewall-cmd --zone=public --list-ports 9876/tcp 8090/tcp 80/tcp 8080/tcp [root@localhost ~]# firewall-cmd --zone=public --remove-port=9876/tcp --permanent success [root@localhost ~]# firewall-cmd --reload success [root@localhost ~]# firewall-cmd --zone=public --list-ports 8090/tcp 80/tcp 8080/tcp [root@localhost ~]
原文:https://www.cnblogs.com/jinanxiaolaohu/p/12011348.html