From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager 13/14] network: warn if pve-firewall cannot isolate guests in zone VRFs
Date: Thu, 19 Nov 2026 20:45:45 +0100 [thread overview]
Message-ID: <20261119194547.674512-14-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20261119194547.674512-1-s.hanreich@proxmox.com>
pve-firewall tracks the connections of guests with the firewall enabled
on a network device on their firewall bridges, in a conntrack zone that
is shared by all VRFs, so the conntrack zones of zone VRFs do not keep
these connections apart.
Warn when applying the network configuration if zone VRFs exist and the
enabled firewall is pve-firewall instead of the nftables firewall, which
sets the conntrack zone before tracking the connections of guests.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
PVE/API2/Network.pm | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 064fe40a..a10a47e1 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -12,6 +12,8 @@ use PVE::RESTHandler;
use PVE::RPCEnvironment;
use PVE::JSONSchema qw(get_standard_option);
use PVE::AccessControl;
+use PVE::Firewall;
+use PVE::Firewall::Helpers;
use PVE::Network;
use IO::File;
@@ -42,6 +44,18 @@ my sub apply_vrf_ct_zones {
warn "failed to apply the conntrack zones of zone VRFs - $@" if $@;
}
+# pve-firewall tracks the connections of guests with the firewall enabled on a network device on
+# the firewall bridges, in a conntrack zone that is shared by all zone VRFs
+my sub warn_vrf_zones_with_legacy_firewall {
+ my $zones = PVE::Network::SDN::running_config()->{zones}->{ids} // {};
+ return if !grep { defined($_->{'ct-zone'}) } values $zones->%*;
+ return if PVE::Firewall::Helpers::is_nftables();
+ return if !PVE::Firewall::load_clusterfw_conf()->{options}->{enable};
+
+ warn "guests with the firewall enabled on a network device are not isolated between zone"
+ . " VRFs with pve-firewall, use the nftables firewall instead\n";
+}
+
my $bond_mode_enum = [
'balance-rr',
'active-backup', # OVS and Linux
@@ -985,7 +999,10 @@ __PACKAGE__->register_method({
};
PVE::Tools::run_command(['ifreload', '-a'], errfunc => $err);
- apply_vrf_ct_zones() if $have_sdn;
+ if ($have_sdn) {
+ apply_vrf_ct_zones();
+ eval { warn_vrf_zones_with_legacy_firewall() };
+ }
# needs the zone VRFs created by ifreload, because dnsmasq is started inside
# them with 'ip vrf exec'
--
2.47.3
next prev parent reply other threads:[~2026-11-19 19:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 19:45 [PATCH docs/manager/network/proxmox{,-ve-rs,-firewall} 00/14] sdn: conntrack zones and SNAT for simple zones with a dedicated VRF Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox 01/14] network-api: expose the master device of a link Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox-ve-rs 02/14] sdn: config: read the conntrack zone of zones with a dedicated VRF Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox-ve-rs 03/14] sdn: conntrack: map the interfaces of zone VRFs to their conntrack zone Stefan Hanreich
2026-11-19 19:45 ` [PATCH pve-network 04/14] sdn: simple: SNAT via the uplinks of zone VRFs Stefan Hanreich
2026-11-19 19:45 ` [PATCH pve-network 05/14] sdn: zones: assign a conntrack zone to zones with a dedicated VRF Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox-firewall 06/14] firewall: apply vnet rules to host traffic from vnets in a VRF Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox-firewall 07/14] nftables: expression: add a constructor for map lookups Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox-firewall 08/14] nftables: statement: add a helper for setting the conntrack zone Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox-firewall 09/14] nftables: expression: convert the conntrack zones of zone VRFs Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox-firewall 10/14] firewall: add a command applying " Stefan Hanreich
2026-11-19 19:45 ` [PATCH proxmox-firewall 11/14] firewall: put guest traffic of zone VRFs into their conntrack zone Stefan Hanreich
2026-11-19 19:45 ` [PATCH pve-manager 12/14] network: apply the conntrack zones of zone VRFs Stefan Hanreich
2026-11-19 19:45 ` Stefan Hanreich [this message]
2026-11-19 19:45 ` [PATCH pve-docs 14/14] pvesdn: simple zones: document dedicated VRFs Stefan Hanreich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119194547.674512-14-s.hanreich@proxmox.com \
--to=s.hanreich@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.