I have the following commands in a Kickstart post-install script:
firewall-offline-cmd --new-zone=management
firewall-offline-cmd --zone=management --add-service=ssh --add-service=snmp
firewall-offline-cmd --zone=management --change-interface=eth1
nmcli device modify eth1 connection.zone management
From my reading it seems that firewalld
can't make these changes when NetworkManager is in the picture, so I added in the nmcli
command to change the zone. But it is not taking effect. After the install is complete and the server reboots, the interface remains in the default zone. After that I can then run the nmcli
command and it will take effect.
I can't find anything online about this problem, except maybe this article, but it's behind a paywall.
I've run into this issue as well. I got around it with this hack:
I'd prefer something more elegant but have settled on that for the time being.
Long story short: "Do not use it, it does not work"
Resolution
So nmcli is good tool for network config automation. You can use is for every purpose, except installation.