From owner-freebsd-net@freebsd.org Fri Jul 21 16:05:17 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 BAFB7DAB0E4 for ; Fri, 21 Jul 2017 16:05:17 +0000 (UTC) (envelope-from vegeta@tuxpowered.net) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 749F974B27 for ; Fri, 21 Jul 2017 16:05:17 +0000 (UTC) (envelope-from vegeta@tuxpowered.net) Received: by mail-wm0-x232.google.com with SMTP id w191so12060308wmw.1 for ; Fri, 21 Jul 2017 09:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxpowered-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version; bh=AliD3e3ScuvnKlmEvNjiz9DXvQ3r2lugJ1SfpaAvphU=; b=c51/GWojVlOaPC2VR4GypGKg0ZeC9ToWu698i9i+lR4pdc2kJYDhtorfcQy+YMPG0D /hJaKOH+MyGaWKvnIVIX3H7OS1zhLx1BaTL6DVNs0iBYXShmz6n0xxWd5HSpPmnRsjI1 OqHavd3eM7Kd2LjbVjM1LQCmzZw5lb+1LHkT1klCAqYDLex7a9rgzCJTB5wcXqlufQqo oEaT3OSaDC9UOhPmIQYe24U6OfVGz/yngxonHsfoM2Aq1ZbjKDHG2WwMiB7PJ++09iO8 T36+YYHlNxv4ECtdZDj3HI/FGocx/hk/YNlx388xZuJGQ3rMSFmrjg0X7M1iJXzUX+8B fpfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version; bh=AliD3e3ScuvnKlmEvNjiz9DXvQ3r2lugJ1SfpaAvphU=; b=uhKs0Vg92DxkBH8ltGomQTZE2bwFhGnepRe6nqOZpytQ3FFgyxWj6K6XmnPd3GImcT kytwDz6VaAcrfEKonRukb0EjV0HGeIHcMdNmwLtcpTEiUd4YU0MP+nQsOdg8/RxE3nbL 92P6PWLP51YKOgh9EUliLNk+FgzYrlTjne6fGgKbjVREeRsn4s0nWbBvIUDxxm5d4X19 RZa7OcwZTDdfrtIIaghTI6Z0nzq+b44nEhivHXUxj4XAdihKlmnKxDt2Lzw4uoc89AAB 4DVNqLOEDCo6L9Tlq9UoxqCKCLWABAM68hLgISQ+9vNAJ1AwUfUUKdMLPVBHlTpNgSC5 ljVw== X-Gm-Message-State: AIVw110nViX7Rh73r6Zpe+ftfeI06aQMay3tDpvg6eds1timS2b9Tuef ZJlNjnD+EuRvQ7XVm9yQQg== X-Received: by 10.80.182.201 with SMTP id f9mr6394163ede.44.1500653115310; Fri, 21 Jul 2017 09:05:15 -0700 (PDT) Received: from energia.localnet ([2a00:1f78:fffb:220:c7f7:2dda:4b51:2d6b]) by smtp.gmail.com with ESMTPSA id e7sm2832340edk.80.2017.07.21.09.05.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jul 2017 09:05:13 -0700 (PDT) From: Kajetan Staszkiewicz To: Eugene Grosbein Cc: FreeBSD Net Subject: Re: ipsec encryption only via given route Date: Fri, 21 Jul 2017 18:05:01 +0200 Message-ID: <5382298.hL91o62syh@energia> Organization: tuxpowered.net User-Agent: KMail/5.2.3 (Linux/4.11.0-3.3-liquorix-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <5971D2DF.6030904@grosbein.net> References: <3526072.muFbfPklCK@energia> <5971D2DF.6030904@grosbein.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart7082166.ChG8rV0ejj"; micalg="pgp-sha1"; protocol="application/pgp-signature" 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: Fri, 21 Jul 2017 16:05:17 -0000 --nextPart7082166.ChG8rV0ejj Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Dnia pi=C4=85tek, 21 lipca 2017 17:09:35 CEST Eugene Grosbein pisze: > 20.07.2017 23:17, Kajetan Staszkiewicz =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > Hey group, > >=20 > > Can I somehow make IPsec encryption to happen AFTER routing decision and > > ensure that it happens only when traffic leaves via specified interface? >=20 > You may want to upgrade to 11.1-RELEASE and utilize its new if_ipsec(4) > feature targeted for creating route-based VPNs. >=20 > https://www.freebsd.org/cgi/man.cgi?query=3Dif_ipsec&apropos=3D0&sektion= =3D0&manpa > th=3DFreeBSD+11.1-RELEASE&arch=3Ddefault&format=3Dhtml This seems promising. I understand that it would replace if_enc which I hav= e =20 enabled to properly firewall tunnel mode IPsec. I also run multiple gif + transport mode tunnels, those never needed if_enc= =20 and were never prone to bug 220217. Now with if_enc the de-IPsec-ed gif=20 traffic passes via single common enc0. I would be so happy to get rid of=20 if_enc again. Unfortunately I don't see much information how to make it work with=20 Strongswan. Any hints? =2D-=20 | pozdrawiam / greetings | powered by Debian, FreeBSD and CentOS | | Kajetan Staszkiewicz | jabber,email: vegeta()tuxpowered net | | Vegeta | www: http://vegeta.tuxpowered.net | `------------------------^---------------------------------------' --nextPart7082166.ChG8rV0ejj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSOEQZObv2B8mf0JbnjtFCvbXs6FAUCWXImLQAKCRDjtFCvbXs6 FPIWAKCfY5DZReYXIFdaUFwj66FZO4mmuACeLCIT4Bg1ItJ5ymUr0twaMdDKs0A= =Nzud -----END PGP SIGNATURE----- --nextPart7082166.ChG8rV0ejj--