Use this command to find your active zone(s):
(使用此命令查找您的活动区域:)
firewall-cmd --get-active-zones
It will say either public, dmz, or something else.
(它会说是public,dmz或其他名称。)
You should only apply to the zones required. (您只应申请所需的区域。)
In the case of public try:
(在公共尝试的情况下:)
firewall-cmd --zone=public --add-port=2888/tcp --permanent
Then remember to reload the firewall for changes to take effect.
(然后,请记住重新加载防火墙以使更改生效。)
firewall-cmd --reload
Otherwise, substitute public for your zone, for example, if your zone is dmz:
(否则,用public代替您的区域,例如,如果您的区域是dmz:)
firewall-cmd --zone=dmz --add-port=2888/tcp --permanent
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…