From nobody Tue Jan 24 13:22:57 2023 X-Original-To: pf@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P1SMQ07XWz3bSYC for ; Tue, 24 Jan 2023 13:22:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P1SMP6Dk9z4Djr for ; Tue, 24 Jan 2023 13:22:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674566577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jm+fACSajHB+5cSHFGGMp9c+MLAPjMjJHUONN9ufU5M=; b=Qrch9T7sthnBABhSIA27bCXe7d/YPF+p+jkcVajxiRyNp9ouiXc46dE4MvcGk/NR06G1E2 52g+bRuYke3MPN/I7T17Q0pmLeMuFaRjqQ0oKSPSJNTdYM2GceTFiJAXOqBimWDgwgzhEN /liVmZgFoor+KSB0pr8xvB92dzTmp0fm72ZI59MTkUkSq27sEMmPnwIby4RPlZO4ahMTF8 D2uHygAeIpj1qHyPnHNGPtzuKdeRUShtDHie/aq1ERH6FBZ6XJs2dZxoNErxHskjDM/HCu f1w4rcIp/AYWTVzqHJwooPDk8zV1dgarYpDw8vHyW3O4FSjA/w055BA5m9a1wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674566577; a=rsa-sha256; cv=none; b=IBKtaEiwLLPbdeizV8X1N2qenkLcqrf51DXnaxdqeWcVl1K5PJYTUIIW0c9NBuNX/tZMvz TafeXt7I1eJJVxBsO9+TMI+6BZMhv8qz4AlFJMXQxDAWmpxPMQ7uqM4CWascvvslUPuMZd ZFejDD71e+ss13nAYB77Z+9D+2WC+K5JnjIxVW5e4K+YVOK9yk6WmQoAMx+cNtJqOYrHo3 eq9nzErcuiCjdipFfmt+SqzhZ+60RLjcJ8wstZIfpy9oiB6Wt0+m6raT0KZWnBrtBg/FAk kKsd4KhIFd1aZ0jWCqrClzABnLmm4SfdkvJDA/ETTwF2p+sMrsLM/dXsKAc9bA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P1SMP5Bwdz19VB for ; Tue, 24 Jan 2023 13:22:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 30ODMv1U016753 for ; Tue, 24 Jan 2023 13:22:57 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 30ODMvUI016752 for pf@FreeBSD.org; Tue, 24 Jan 2023 13:22:57 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: pf@FreeBSD.org Subject: [Bug 268717] [pf] rdr rules don't work for traffic originating at localhost Date: Tue, 24 Jan 2023 13:22:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dfr@rabson.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268717 --- Comment #14 from dfr@rabson.org --- For my use-case, I need to be able to change both destination address and p= ort and currently the nat rule only allows changing the address. Also, I'm not = sure that nat will work here since it re-writes the source address and I need to change the destination address. As I understand the current situation with rdr, for new local connections, a PF_IN event is triggered when the packet leaves the local network stack and this matches the rdr rule, re-writing destination address and port and sett= ing a state to match the reply. Unfortunately for reply packets no corresponding PF_OUT event is triggered when the packet is delivered to the local network stack so the reverse re-write does not happen. This is why my suggested cha= nge works since it simulates the PF_OUT event for packets which will be process= ed locally. --=20 You are receiving this mail because: You are the assignee for the bug.=