未生效
[root@HAN etc]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2023-06-14 18:05:30 CST; 15h ago
Docs: man:firewalld(1)
Main PID: 24988 (firewalld)
CGroup: /system.slice/firewalld.service
└─24988 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
Jun 14 18:05:30 HAN systemd[1]: Starting firewalld - dynamic firewall daemon...
Jun 14 18:05:30 HAN systemd[1]: Started firewalld - dynamic firewall daemon.
Jun 14 18:05:30 HAN firewalld[24988]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a ...ng it now.
Hint: Some lines were ellipsized, use -l to show in full.
[root@HAN etc]# firewall-cmd --zone=public --add-port=3306/tcp --permanent
success
[root@HAN etc]# firewall-cmd --reload