From nobody Wed Jan 25 08:14:07 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 4P1xSb6tW8z30th7 for ; Wed, 25 Jan 2023 08:14:07 +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 4P1xSb4VyHz3Pww for ; Wed, 25 Jan 2023 08:14:07 +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=1674634447; 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=EKDvsBjbuEQ7ZBFgcVwMsYF+zsgXbXHfF/MS0dy1iCM=; b=CW7EM9DHEqwpnyJvoiGnuip8Z/UmnCMvgtrEI60+cBxPkMOTI8qy6BshARPij5VvDFULQH zHj9gpVVyjn+eMmp57ld5uq9YhVHyBIaQOl8OLXdjMmGaQPXGygWjmP/9wvC4pTj7kTXRh 7MfuxGyYxigSf6Z9F8qUtzHHvsiwE/3s6hE3hcJEcSM9AswgeDCL3gZvJ2jkEd9ruCmc6+ zaSeeEnBdSD06ukHHAEMbuWZwxoiToIQPWzSb4/c6IZ9h7EXPFoOIjhV3t2V/n/gu0J/7y 3gRCKvaLdd+uAGZhtgztRvgm1EfWkz2AvPLBwE1GNocV5vKmPHFdD+9GYQ52zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674634447; a=rsa-sha256; cv=none; b=wjZwB4kPpmn+30HasQMS0VyoZ45N14ojJRDfKRQIGfc3aR1Zm8PSKbgmogB476CCXznQ8o dqrpXq0ZWMkxNKzdNv9wzLSpuN5Swfn4KcjCwKL9Q5wPgVO4BKCXaf21qd/X9j6l+H4XGR ZNSHaMtaAeR1JTRJBdgg0R67zuzfwe5Rw3pjyTTbVthx+gAwY87bpLdDZySU7iuTmrMMGC cnjnisq/eq2OaEtxiqfG/W32p2O38uE8v3H2m6IkJ58ITXFzLXhBiqtErmsfssGQsX9B/k mFzrdV2p05D0EIt6W+N/mQ+6F5lTme199e5sUspXtGXmxnsgKw0relDSuaxVhA== 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 4P1xSb3ZpTzj7k for ; Wed, 25 Jan 2023 08:14:07 +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 30P8E7Bc015024 for ; Wed, 25 Jan 2023 08:14:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 30P8E7xS015023 for pf@FreeBSD.org; Wed, 25 Jan 2023 08:14:07 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: Wed, 25 Jan 2023 08:14:07 +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: kp@freebsd.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 #15 from Kristof Provost --- (In reply to dfr from comment #14) Right, but rdr very much expects to be used on inbound traffic only. I believe the relevant code to be in pf_get_translation(), where we only lo= ok at the RDR ruleset if direction !=3D PF_OUT (i.e. it's PF_IN). So I think we have three choices: 1) extend nat (or binat) to be able to change the port and destination addr= ess (rather than source address). 2) teach rdr to work on PF_OUT 3) Build on the work in https://reviews.freebsd.org/D38025 and use OpenBSD's rdr-to, where the man page at least seems to suggest it can also work out outbound traffic. --=20 You are receiving this mail because: You are the assignee for the bug.=