How do I change a zone?

To change the zone of a network interface using firewalld, you can use the following command:

firewall-cmd --zone=<new-zone> --change-interface=<interface-name>

Replace <new-zone> with the desired zone (e.g., home, work, public, etc.) and <interface-name> with the name of the network interface you want to change (e.g., eth0, wlan0, etc.).

For example, to change the zone of the interface eth0 to home, you would run:

firewall-cmd --zone=home --change-interface=eth0

To make the change permanent, add the --permanent flag:

firewall-cmd --zone=home --change-interface=eth0 --permanent

After making changes, reload the firewalld configuration to apply them:

firewall-cmd --reload

0 Comments

no data
Be the first to share your comment!