When running
[root@host ~]# firewall-cmd --get-active-zones
[root@host ~]#
[root@host ~]# firewall-cmd --get-default-zone
public
I am not getting any active zones. How can I activate a zone?
You activate a zone by binding a network interface or source IP address range(s) to it. Any firewall rules in the zone then apply to that network interface or IP address range(s).
firewall-cmd --permanent --zone=public --change-interface=eth0
(for example).
--get-active-zones
should print the default zone as well. Maybe as public (implicit) internal home
or whatever.
firewall-cmd --reload
after change interface command @negacao said to commit changes.
On a similar case, I took a peek with strace
and realized, that FirewallD had somehow lost D-Bus access completely.
The easiest fix was to reboot the Linux. That helped and FirewallD saw active zones again.
I had the same question, except I had definitely had an interface in a zone. For me I had to restart the firewalld service.