From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id BBF641FF066 for ; Tue, 24 Nov 2026 18:58:32 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 00753217D8; Tue, 24 Nov 2026 18:57:34 +0100 (CET) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Subject: [PATCH firewall/proxmox{-ve-rs,-firewall} 0/7] firewall: handle guest network devices without a MAC address Date: Tue, 24 Nov 2026 18:57:10 +0100 Message-ID: <20261124175718.512428-1-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795543046568 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.176 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: PFG3UJ5TD5DCKHT2DFA7UYVOSQYTQHGJ X-Message-ID-Hash: PFG3UJ5TD5DCKHT2DFA7UYVOSQYTQHGJ X-MailFrom: s.hanreich@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: A guest network device without a MAC address is valid for qemu-server and pve-container, which generate a random one each time they parse the device. The API always stores one, but manual edits and restored backups are accepted without any MAC or type set. pve-firewall built its MAC and IP filters from random addresses, a different one for each rule and on every compile. With the MAC filter enabled, it thus dropped all traffic the device sent, and the IP filter dropped traffic from its link-local addresses. (unless you were really lucky). proxmox-firewall failed to parse such a guest's network config completely. Both firewalls now drop the traffic of a device without MAC address explicitly if the MAC filter is enabled. and the IP filter drops its auto-derived link-local addresses. That keeps the effective behavior of pve-firewall, with stable rules, and proxmox-firewall behaves the same. ## Dependencies pve-firewall requires pve-container from my other patch series [1] proxmox-firewall requires proxmox-ve-rs semver: ve-rs change breaks the public API [1] https://lore.proxmox.com/pve-devel/20261124145651.335234-1-s.hanreich@proxmox.com/T/#t proxmox-ve-rs: Stefan Hanreich (3): ve-config: guest: require the name of container network devices ve-config: guest: default the type of container network devices to veth ve-config: guest: accept network devices without a MAC address proxmox-ve-config/src/guest/vm.rs | 99 ++++++++++++++++++++++++------- 1 file changed, 79 insertions(+), 20 deletions(-) proxmox-firewall: Stefan Hanreich (2): firewall: guest: handle network devices without a MAC address tests: add network devices without MAC address proxmox-firewall/src/firewall.rs | 38 +- proxmox-firewall/tests/input/100.conf | 1 + proxmox-firewall/tests/input/101.conf | 1 + .../integration_tests__firewall.snap | 399 ++++++++++++++++++ 4 files changed, 429 insertions(+), 10 deletions(-) pve-firewall: Stefan Hanreich (2): firewall: drop the traffic of guest network devices without MAC address firewall: do not generate MAC addresses for guest network devices src/PVE/Firewall.pm | 46 +++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) Summary over all repositories: 6 files changed, 532 insertions(+), 52 deletions(-) -- Generated by murpp 0.12.0