When the system is using NetworkManager to handle interface configuration (as may be indicated by empty or missing /etc/sysconfig/network-scripts/*
directory entries), try the following steps to set the zone via NetworkManager's configuration system:
- verify NetworkManager is running:
systemctl status NetworkManager
$ systemctl status NetworkManager
● NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running)
- if so, list the connection "profile name" (which may differ from device names) by using:
nmcli
$ nmcli
vvvvvvvvvvvvvvvvvv "profile name"
eth0: connected to Wired connection 1
"Red Hat Virtio"
ethernet (virtio_net),
- set the desired "ZONE" with
nmcli
using the profile name, example:
$ nmcli connection modify "Wired connection 1" connection.zone ZONE
The zone change should be immediately visible via firewall-cmd --get-active-zones
and persist across future reboots.