How to make the NIC change to another firewall zone permanently
Issue
-
How to make the NIC change to another firewall zone permanently?
-
Cannot make the NIC change to another firewall zone permanently thorough
firewall-cmd --permanent --zone=client1 --change-interface=NIC.
# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens160 ens256
sources:
services: cockpit dhcpv6-client http ssh
ports: 80/tcp 8080/tcp
protocols:
forward: no
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
# firewall-cmd --permanent --zone=client1 --change-interface=ens256
success
# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens160 ens256
sources:
services: cockpit dhcpv6-client http ssh
ports: 80/tcp 8080/tcp
protocols:
forward: no
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- VMware Platform
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.