firewall-cmd开放某个端口[root@localhost ~]#firewall-cmd --add-port=3306/tcp --zone=public --permanent [root@localhost ~]#firewall-cmd --reload [root@localhost ~]#firewall-cmd --list-portfirewall-cmd关闭某一个端口[root@localhost ~]#firewall-cmd --remove-port=3306/tcp --zone=public --permanent [root@localhost ~]#firewall-cmd --reload [root@localhost ~]#firewall-cmd --list-portfirewall-cmd开放某个服务[root@localhost ~]#firewall-cmd --add-service=ssh --zone=public --permanent [root@localhost ~]#firewall-cmd --reload [root@localhost ~]#firewall-cmd --list-servicefirewall-cmd关闭某一个服务[root@localhost ~]#firewall-cmd --remove-service=ssh --zone=public --permanent [root@localhost ~]#firewall-cmd --reload [root@localhost ~]#firewall-cmd --list-service
评论区