From owner-freebsd-net@freebsd.org Thu Jul 20 22:02:39 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 E7E98CFD115 for ; Thu, 20 Jul 2017 22:02:39 +0000 (UTC) (envelope-from vegeta@tuxpowered.net) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 797EB7E246 for ; Thu, 20 Jul 2017 22:02:39 +0000 (UTC) (envelope-from vegeta@tuxpowered.net) Received: by mail-wm0-x236.google.com with SMTP id g127so38069541wmd.0 for ; Thu, 20 Jul 2017 15:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxpowered-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:organization:user-agent :mime-version; bh=OqgOL9RmRyBa6i/TGnTpaRV5GGAjmQeAL+/iPr9Kw50=; b=0y0N9PLV3RXbfRzr82Nn/YvB9GlRJZqsHKxWBcluEi5ictcXFBJm8yXjk5y3Z4teLS sPAGsQRYDhhQ+DpqBP/Fz89geBi6a+8lb6YcfHrkStnE/zSQ/Z9r64sJMBb15jTEwwMh XnEMpyqWERmXXOy8VILBuNCth2O6/35V/RW5wguW/ReveTYBeMhzSlSj32sddiYf+eDE +DV7BTWBprPxHlzuk5kMuFjREFyaGkOLu7+Dz4BhWr4nhGrxof3++/7wyKi3f6CgAbDD UZiisyzSj+P+Sf1J9vwZHKIwkbGpgX9D3kIX7zE6xTRxC/AWu3pFIrzMLwq6u7/tI5a9 NRcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:organization :user-agent:mime-version; bh=OqgOL9RmRyBa6i/TGnTpaRV5GGAjmQeAL+/iPr9Kw50=; b=EA5wus8mXRVqs9qd2cCDJB06CXmLMvDv7edQlfxVwyXsY8TY/S0AQUISsFAEHByEBl 6baaUWDIRFvW/499sL3rL4agfUEayirhQQXCfSuvKMwMMZMLBILxJK22gc0GRFRDZMwM HXPwJuUY4f4PLQtqxUF1DpsGe/YoIQSme42Z382ScO/aO5WH5W865Ke7Vasx9Ucl+c2j fNZDc/sBRMb3Gh4+awkthnMrdzZ61/oryrkKymXnPxRJz4RbV06EvUZiuFycAVNPUUMH /D5vaPIsH2P8K0ZwaigP7QCj0XJPJzi2EYjfiX6tppYTffdOInlGjOqKCS9FPiMdN1Ye /FCg== X-Gm-Message-State: AIVw110tI4MUXyqt1WX21aOdixRS9YrYOzqMsaKy37YB+RL2wH0Wqe9K Rn2SI/adjhkxQ2pH0n/YKA== X-Received: by 10.80.165.197 with SMTP id b5mr3981466edc.13.1500588157706; Thu, 20 Jul 2017 15:02:37 -0700 (PDT) Received: from energia.localnet ([2a02:8108:4b3f:d254:6257:18ff:fe79:5108]) by smtp.gmail.com with ESMTPSA id n15sm1453373edb.87.2017.07.20.15.02.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jul 2017 15:02:36 -0700 (PDT) From: Kajetan Staszkiewicz To: FreeBSD Net Subject: IPsec tunnel mode with gif Date: Fri, 21 Jul 2017 00:02:32 +0200 Message-ID: <1865385.GS045ia5gu@energia> Organization: tuxpowered.net User-Agent: KMail/5.2.3 (Linux/4.11.0-3.3-liquorix-amd64; KDE/5.28.0; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2906105.rck5h4RQ7z"; 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: Thu, 20 Jul 2017 22:02:40 -0000 --nextPart2906105.rck5h4RQ7z Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" Hi group, =46or many years I have used the trick of running a GRE or GIF tunnel encry= pted=20 with IPSec transport mode, both on FreeBSD and Linux. That allows me to run= =20 BGP or OSPF on the tunnels. I am also aware of IPsec tunnel mode which kind of works for me, although i= s=20 not my personal choice. Both modes of operation seem quite straightforward. Yet for a reason beyond my understanding FreeBSD handbook proposes a 3rd mo= de:=20 using a GIF tunnel together with IPSec tunnel mode. I really don't understa= nd=20 how is that supposed to work. People On The Internet also seem not to be ab= le=20 to understand the reasoning behind such solution. Since IPSec stack provide= s=20 its own encapsulation in tunnel mode, packets coming to a router would neve= r=20 reach the GIF interface and would never be encapsulated by it. Same for=20 packets received, they would be deencapsulated by IPsec stack and reinjecte= d=20 with internal IP addresses on a public interface of router or they would=20 appear on enc0 interface if it is in use. Am I wrong? Or is the Handbook wrong? =2D-=20 | pozdrawiam / greetings | powered by Debian, FreeBSD and CentOS | | Kajetan Staszkiewicz | jabber,email: vegeta()tuxpowered net | | Vegeta | www: http://vegeta.tuxpowered.net | `------------------------^---------------------------------------' --nextPart2906105.rck5h4RQ7z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSOEQZObv2B8mf0JbnjtFCvbXs6FAUCWXEoeAAKCRDjtFCvbXs6 FCv5AKDPkIpLWpkxNNPeEbEVx6WjY3zgiACfYaAWlat+YvUoh7GkRF03KSliI0c= =gyN5 -----END PGP SIGNATURE----- --nextPart2906105.rck5h4RQ7z--