netplan can not configure firewalld zone
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
On a PC with 2 nic's, I would like to set up a firewall. One nic is for internal network, the other nic is facing public.
I like the systax from firewalld, so I rather use that instead of ufw.
With netplan I configured my interfaces, but there I found no way to make the following persistent:
root@AAA-ONC:~# firewall-cmd --permanent --zone=internal --add-interface
The interface is under control of NetworkManager, setting zone to 'internal'.
success
After reboot NetworkManager resettet that command.
root@AAA-ONC:~# firewall-cmd --get-active-zones
docker
interfaces: br-d1c181616ae5 docker0
public
interfaces: enp1s0 enp2s0
Linux AAA-ONC 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Package: netplan.io
Version: 0.105-0ubuntu2~
Package: network-manager
Version: 1.36.6-0ubuntu2
Hello there,
Netplan doesn't support configuring zones in network manager keyfiles yet. Although you can do that with the "passthrough" property. Example:
network: nager:
passthrough:
connection. zone: internal
version: 2
renderer: NetworkManager
ethernets:
enp2s0:
dhcp4: true
networkma
After applying your configuration (or rebooting) you will find the lines below in /var/run/ NetworkManager/ system- connections/ netplan- enp2s0. nmconnection:
#Netplan: passthrough setting
zone=internal
I hope it helps :)