From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id BF2691FF179 for ; Wed, 1 Oct 2025 09:00:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6980117BCF; Wed, 1 Oct 2025 09:00:08 +0200 (CEST) Message-ID: <36ac861e-e834-45ad-9f50-75e3be31c4f4@proxmox.com> Date: Wed, 1 Oct 2025 09:00:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Stefan Hanreich References: <20250923122645.154759-1-s.hanreich@proxmox.com> Content-Language: en-US From: Hannes Laimer In-Reply-To: <20250923122645.154759-1-s.hanreich@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1759301978627 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.043 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: Re: [pve-devel] [PATCH proxmox-firewall 1/1] fix #6831: move conntrack statement to forward chain X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Could reproduce the problem(s) and this fixes them. The changes also makes sense, so consider this Tested-by: Hannes Laimer Reviewed-by: Hannes Laimer On 9/23/25 14:27, Stefan Hanreich wrote: > The conntrack statement was included in the host-forward chain, which > is managed by the firewall daemon. It gets flushed in every iteration > of the daemon, but the rule is never re-created in the daemon. This > caused conntracked flows that are routed by the PVE host to not get > accepted. Generally, the ruleset is constructed in a way that all > chains that are managed by the firewall daemon are empty by default - > this was the only exception. Move the ct state statement to the > appropriate chain. Since the forward chain is in the inet table which > never sees ARP traffic in the first place, remove the respective > statement matching on ARP. This is most likely copied from the bridge > table where this modifier is indeed necessary, since there ARP traffic > is visible. > > This also fixes a report from a user in the forum [1], where if the > daemon fails to generate a ruleset there are growing number of entries > in the host-forward chain that consists only of the ct state > statement. This is because the host-forward chain never gets flushed > by the default ruleset, but nftables inserts all rules in the chain an > additional time when executing the default ruleset. > > [1] https://forum.proxmox.com/threads/macro-firewall-rules-not-working-with-nftables.171262/#post-799600 > > Signed-off-by: Stefan Hanreich > --- > proxmox-firewall/resources/proxmox-firewall.nft | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/proxmox-firewall/resources/proxmox-firewall.nft b/proxmox-firewall/resources/proxmox-firewall.nft > index 2456336..ea102ec 100644 > --- a/proxmox-firewall/resources/proxmox-firewall.nft > +++ b/proxmox-firewall/resources/proxmox-firewall.nft > @@ -267,6 +267,7 @@ table inet proxmox-firewall { > > chain forward { > type filter hook forward priority filter; policy accept; > + ct state vmap { established : accept, related : accept, invalid : jump invalid-conntrack } > jump host-forward > jump cluster-forward > } > @@ -278,9 +279,7 @@ table inet proxmox-firewall { > chain host-out {} > > chain cluster-forward {} > - chain host-forward { > - meta protocol != arp ct state vmap { established : accept, related : accept, invalid : jump invalid-conntrack } > - } > + chain host-forward {} > > chain ct-in {} > chain invalid-conntrack { } _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel