From owner-freebsd-pf@freebsd.org Tue Mar 13 01:05:55 2018 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C90D8A7DD71 for ; Tue, 13 Mar 2018 01:05:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6231E7D7EE for ; Tue, 13 Mar 2018 01:05:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 8E38C1B5CD for ; Tue, 13 Mar 2018 01:05:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D15sBD015996 for ; Tue, 13 Mar 2018 01:05:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w2D15sJu015995 for freebsd-pf@FreeBSD.org; Tue, 13 Mar 2018 01:05:54 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: freebsd-pf@FreeBSD.org Subject: [Bug 226411] PF does not properly keep state with GRE in IPSec Date: Tue, 13 Mar 2018 01:05:53 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: eric@edombroski.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-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 MIME-Version: 1.0 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 01:05:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226411 --- Comment #2 from Eric Dombroski --- ################# HOST 1 - ROUTER ################################### root@fbsd12test1:~ # cat /etc/rc.conf hostname=3D"fbsd12test1" ifconfig_vmx0=3D"inet 10.10.10.1 netmask 255.255.255.0" ifconfig_vmx1=3D"inet 10.6.0.1 netmask 255.255.254.0" #lan is a /23 cloned_interfaces=3D"gre0" ifconfig_gre0=3D"inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252 tunnel 10.1= 0.10.1 10.10.10.2 link0 up" gateway_enable=3D"YES" pf_enable=3D"YES" pflog_enable=3D"YES" sshd_enable=3D"YES" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev=3D"AUTO" strongswan_enable=3D"YES" root@fbsd12test1:~ # cat /etc/pf.conf set block-policy drop set loginterface egress set skip on lo0 set skip on gre0 ### has no apparent effect? ### #default block rules block log all # allow in from other host pass in quick on vmx0 from 10.10.10.0/24 # allow all in from lan subnet pass in quick from 10.6.0.0/23 # pass all output packets pass out quick root@fbsd12test1:~ # cat /usr/local/etc/ipsec.conf config setup uniqueids =3D yes conn bypasslan leftsubnet =3D 10.6.0.0/23 rightsubnet =3D 10.6.0.0/23 authby =3D never type =3D passthrough auto =3D route conn con1 fragmentation =3D yes keyexchange =3D ike reauth =3D yes forceencaps =3D no mobike =3D no rekey =3D yes installpolicy =3D yes type =3D transport dpdaction =3D restart dpddelay =3D 10s dpdtimeout =3D 60s auto =3D route left =3D 10.10.10.1 right =3D 10.10.10.2 leftid =3D 10.10.10.1 ikelifetime =3D 28800s lifetime =3D 3600s ike =3D aes256-sha256-modp4096! esp =3D aes256-sha256-modp4096! leftauth =3D psk rightauth =3D psk rightid =3D 10.10.10.2 aggressive =3D no rightsubnet =3D 10.10.10.2 leftsubnet =3D 10.10.10.1 root@fbsd12test1:~ # cat /usr/local/etc/ipsec.secrets # ipsec.secrets - strongSwan IPsec secrets file %any 10.10.10.2 : PSK "testingtestingtesting" ################# HOST 2 - CLIENT ################################### root@fbsd12test2:~ # cat /etc/rc.conf hostname=3D"fbsd12test2" ifconfig_vmx0=3D"inet 10.10.10.2 netmask 255.255.255.0" cloned_interfaces=3D"gre0" ifconfig_gre0=3D"inet 10.1.0.2 10.1.0.1 netmask 255.255.255.252 tunnel 10.1= 0.10.2 10.10.10.1 link0 up" pf_enable=3D"NO" sshd_enable=3D"YES" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev=3D"AUTO" strongswan_enable=3D"YES" root@fbsd12test2:~ # cat /usr/local/etc/ipsec.conf config setup uniqueids =3D yes conn con1 fragmentation =3D yes keyexchange =3D ike reauth =3D yes forceencaps =3D no mobike =3D no rekey =3D yes installpolicy =3D yes type =3D transport dpdaction =3D restart dpddelay =3D 10s dpdtimeout =3D 60s auto =3D route left =3D 10.10.10.2 right =3D 10.10.10.1 leftid =3D 10.10.10.2 ikelifetime =3D 28800s lifetime =3D 3600s ike =3D aes256-sha256-modp4096! esp =3D aes256-sha256-modp4096! leftauth =3D psk rightauth =3D psk rightid =3D 10.10.10.1 aggressive =3D no rightsubnet =3D 10.10.10.1 leftsubnet =3D 10.10.10.2 root@fbsd12test2:~ # cat /usr/local/etc/ipsec.secrets # ipsec.secrets - strongSwan IPsec secrets file %any 10.10.10.1 : PSK "testingtestingtesting" root@fbsd12test2:~ # route add -net 10.6.0.0/23 10.1.0.2 Test tcp connection to host on 10.6.0.0/23 (for instance, 10.6.0.10). SYN packet gets through to, ACK doesn't get back. Also, ICMP traffic let throu= gh even if you remove the pass rules that let it go through. --=20 You are receiving this mail because: You are the assignee for the bug.=