From owner-freebsd-net@freebsd.org Tue Jan 23 14:16:36 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C7D8ED602F for ; Tue, 23 Jan 2018 14:16:36 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::600]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDE747D5CC; Tue, 23 Jan 2018 14:16:35 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 2AB0C2A221BB; Tue, 23 Jan 2018 17:16:23 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id q46aT7bhEq-GN6eUbLx; Tue, 23 Jan 2018 17:16:23 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1516716983; bh=xI9epgxBPey5d2ZMzF+WdCqx7YLSS/SuGHcHsI0C3k8=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=MxOSpOcrlihdjckyg73OMx/B4Z0eBr77+adsU43yXGM631sHjB5L+7OeXhgTiA9K4 vlezKpglealNe9y7hts1CJ+tFPKbJ5uwcurhcpJGABfjSGEJTf0Ui1uBATU0Vz1JLq E1l3AKZmCTZ5G3TfAWz2qmZsXJdP+nHT3BZXUg/s= Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id KVHf8IW2p7-GMBOulof; Tue, 23 Jan 2018 17:16:22 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1516716982; bh=xI9epgxBPey5d2ZMzF+WdCqx7YLSS/SuGHcHsI0C3k8=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=qaPd4wxr6lmYUsrKcNMMXSvHPTPC9V6EtlP/907ZbspfOa5A+55jJU2tXfntfLP2P yje4RWc1LkJILxawshvZ90TiOgpQo9Tkd2/z7R/nkL8S56NIW5nVfUEoUs57I7mZVx kTh4BYlpOVKYBv2hK/6MqmJg5twZAr6qPIz59UPs= Authentication-Results: smtp4j.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: pf: redirect a packet's port but not its address? To: Alan Somers , FreeBSD Net , Kristof Provost References: From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: Date: Tue, 23 Jan 2018 17:16:04 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hMNh5Xie9TomrWJ5jLgspyeaPDLaatlqs" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 14:16:36 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hMNh5Xie9TomrWJ5jLgspyeaPDLaatlqs Content-Type: multipart/mixed; boundary="0VdhQtfovFYlgMGhna8UDbhMu4cf6DTdq"; protected-headers="v1" From: "Andrey V. Elsukov" To: Alan Somers , FreeBSD Net , Kristof Provost Message-ID: Subject: Re: pf: redirect a packet's port but not its address? References: In-Reply-To: --0VdhQtfovFYlgMGhna8UDbhMu4cf6DTdq Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 23.01.2018 03:35, Alan Somers wrote: > All of these problems could be solved if pf were able to redirect a > packet's destination port but not its address. You could bind the daem= on > to INADDR_ANY instead of localhost, and the packet it receives would be= > destined to the same address that the sender intended. >=20 > Unfortunately, pf currently lacks this capability. But it looks like i= t > could be added without breaking existing pf.conf syntax. Would this be= a > good idea? >=20 > I don't use ipfw, but from reading the man page I believe that it has t= he > same problem. I think ipfw should work with such configuration using "fwd" action, since TCP/UDP has special handling for this. --=20 WBR, Andrey V. Elsukov --0VdhQtfovFYlgMGhna8UDbhMu4cf6DTdq-- --hMNh5Xie9TomrWJ5jLgspyeaPDLaatlqs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlpnQ6QACgkQAcXqBBDI oXov9Af+MEAeLmnONxLMCV8oQTQXe5i256ey0JIT5DwuuMS8ISYG0APYaMo5EhXY cfdXv1J8PyB7QV8Fgiq8uMTOopYhz7KFGcPizToDT1foqtYBvD86DmPNN5k/Hbbj fPmc+bkWaLl5gQtRD4PfCxmlSQ6nMF7F36BowfbwXruV1YtPpLJheEy+Ui1aOMhC MW3HbCaLjkI3h1AEeW8warYdns4upaNr0/usrmGCGgVQuXb9tpM+pTjRLtFqdykR D7VCOeA26MUaM4PGrCPl8rFcX/caHFGSmdjSn9JLGiCBf6a4cplY1Et242Hezcit VrQwZ4Qn7gjPddRCbDZl3qPCjVP4jw== =SOSu -----END PGP SIGNATURE----- --hMNh5Xie9TomrWJ5jLgspyeaPDLaatlqs--