[PATCH v2 3/5] network: firewalld: add zone for routed networks

Eric Garver eric at garver.life
Tue May 31 19:00:14 UTC 2022


This zone will be used for the routed network by default.

Note that this zone definition omits "forward" aka intra-zone
forwarding, because it requires firewalld >= 0.9.0.

Signed-off-by: Eric Garver <eric at garver.life>
---
 src/network/libvirt-routed.zone | 10 ++++++++++
 src/network/meson.build         |  5 +++++
 2 files changed, 15 insertions(+)
 create mode 100644 src/network/libvirt-routed.zone

diff --git a/src/network/libvirt-routed.zone b/src/network/libvirt-routed.zone
new file mode 100644
index 000000000000..ed7dd936a242
--- /dev/null
+++ b/src/network/libvirt-routed.zone
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<zone>
+  <short>libvirt-routed</short>
+
+  <description>
+    This zone is intended to be used only by routed libvirt virtual networks -
+    libvirt will add the bridge devices for all new virtual networks to this
+    zone by default.
+  </description>
+</zone>
diff --git a/src/network/meson.build b/src/network/meson.build
index b5eff0c3ab6b..d12e36ce1ca3 100644
--- a/src/network/meson.build
+++ b/src/network/meson.build
@@ -100,5 +100,10 @@ if conf.has('WITH_NETWORK')
       install_dir: prefix / 'lib' / 'firewalld' / 'zones',
       rename: [ 'libvirt.xml' ],
     )
+    install_data(
+      'libvirt-routed.zone',
+      install_dir: prefix / 'lib' / 'firewalld' / 'zones',
+      rename: [ 'libvirt-routed.xml' ],
+    )
   endif
 endif
-- 
2.35.3



More information about the libvir-list mailing list