From owner-freebsd-net@freebsd.org Thu Aug 24 10:40:03 2017 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 27A1EDDC47E for ; Thu, 24 Aug 2017 10:40:03 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:107]) (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 AF3C27334A for ; Thu, 24 Aug 2017 10:40:02 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 02E1F185E29; Thu, 24 Aug 2017 13:39:58 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Rkzlfl54DI-dvwmOYZd; Thu, 24 Aug 2017 13:39:57 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1503571197; bh=KryC5R+GsObVbWWPadxVe8HwBy8Br3ks9vsyn61EhkE=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=Fj/DQSM5WqgCDMhw/PuawmU5aVFDN7On9aPM2qCbd4XgGskkccNX4HqBph/VdO7Wj EavHVJjO+d0yPPJTdLcvntSaB8PhakEyAFvoZJc7Oz4E8LasY5wo+HaOxooYHArf+O F4Eze1SZCjPC2+hGN/OIPRxlC/hF+bfN/VLYvJVA= Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 9aP9T0tKiw-duoSWPqR; Thu, 24 Aug 2017 13:39:56 +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=1503571196; bh=KryC5R+GsObVbWWPadxVe8HwBy8Br3ks9vsyn61EhkE=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=e2r2Li0easPRj3RZCbL34qCzRu4cfCxTm7k4a7sSfiacDwqJIbxfJHRVR2hS9ykUN gqucnOXnfRS5Fa8bU+9p/1bpFetwe/3ijv8lNu2tLzIuUIwo836JLDInXiMd7NAuGX wnSn010SHQYCgtbJNu1AuvHdpfbZIqjrPi2Djf0Q= Authentication-Results: smtp4j.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: NAT-before-ipsec using if_ipsec To: Jimmy Olgeni , freebsd-net@freebsd.org References: From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <9432b56b-b8d4-dfa0-8508-194afd75381c@yandex.ru> Date: Thu, 24 Aug 2017 13:36:15 +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="i6iGu1qdcvqoWU9FRJ2e5OaVK0sFw81HH" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 10:40:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i6iGu1qdcvqoWU9FRJ2e5OaVK0sFw81HH Content-Type: multipart/mixed; boundary="RMpLCvRixtFlPQsbCLiQUhucbkRSFSdMR"; protected-headers="v1" From: "Andrey V. Elsukov" To: Jimmy Olgeni , freebsd-net@freebsd.org Message-ID: <9432b56b-b8d4-dfa0-8508-194afd75381c@yandex.ru> Subject: Re: NAT-before-ipsec using if_ipsec References: In-Reply-To: --RMpLCvRixtFlPQsbCLiQUhucbkRSFSdMR Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 24.08.2017 12:38, Jimmy Olgeni wrote: >=20 > Hi, >=20 > I came up with a working setup of if_ipsec, and was wondering if now > it would be possible to perform NAT before ipsec using the resulting > 'ipsec0' interface. >=20 > The native PF solution seemed to be this: >=20 > nat on ipsec0 from 172.30.1.1/28 to any -> 172.30.1.1 >=20 > But while it works on external interfaces, it does nothing for ipsec. Can you describe your configuration, it is not clear to me, how you expect it should work? --=20 WBR, Andrey V. Elsukov --RMpLCvRixtFlPQsbCLiQUhucbkRSFSdMR-- --i6iGu1qdcvqoWU9FRJ2e5OaVK0sFw81HH 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/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlmerCAACgkQAcXqBBDI oXqaRAf9EQxmRS+uHpfGmx9eMnqWszJYw+loR/y1hN/w1NuwW308V84hKmUOdyyi GN4xSaQb72pzvtpka0IZ8ljSxfsTqth3tJgk+BSRxBqS+FzLnXS2OS9Yr3q80zQM IrPAQ9lQ8bHN+4xUok02C0geOGbFDs4eq2cIfPCMSvoSY0APU0tdrJvAjCiol6LH DVhRt2T7Wl/1QNgwPMwBhDGOYUbBcAKPZxuYgRKHQ1y5PKLRjKcrqHKeGN00ufGM 9rLCW0wxeJEDzcJagpH3OowjN4D1P+GzTOcD5sAw+PD722ezwF1oTdjtMuC4yzrF 0vicqm53EVeB45TeMmYS5AIqbfHvRg== =oMu9 -----END PGP SIGNATURE----- --i6iGu1qdcvqoWU9FRJ2e5OaVK0sFw81HH--