From owner-freebsd-pf@freebsd.org Tue Dec 3 09:49:13 2019 Return-Path: Delivered-To: freebsd-pf@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2CE31CFA83 for ; Tue, 3 Dec 2019 09:49:13 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47Rxyd1Gwzz49cq for ; Tue, 3 Dec 2019 09:49:13 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=XYQLejIoFFfFIeFpX1FALMj5TqGvzNpR09Ev6cWAXLw=; b=Py8rSXfi8K4FtJ6y9oy3IRpclH AqToHvqiiFvaqX+PJ3VDjtZRqjI82YhqJVgxRSrT6e0cHFaH+CbbgBvZTppnLKx55R5MgaqQe92uX CbiZuFyfCguWfR5kEBhBkUBqV4AUnANI0bP3YOUw75T+bpxTLcT1nGgfHkTXneUZ8PSo=; Received: from vas by admin.sibptus.ru with local (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1ic4nv-000B3i-KE for freebsd-pf@freebsd.org; Tue, 03 Dec 2019 16:49:11 +0700 Date: Tue, 3 Dec 2019 16:49:11 +0700 From: Victor Sudakov To: freebsd-pf@freebsd.org Subject: Re: pf's states Message-ID: <20191203094911.GF40372@admin.sibptus.ru> References: <20191202025642.GA99174@admin.sibptus.ru> <7a5b77d9-29d2-4fb4-b82c-3e6a194baf6e@tuxpowered.net> <20191202152543.GA16128@admin.sibptus.ru> <20191203034903.GA33853@admin.sibptus.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fwqqG+mf3f7vyBCB" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47Rxyd1Gwzz49cq X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=Py8rSXfi; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-8.47 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-3.37)[ip: (-9.87), ipnet: 2001:19f0:5000::/38(-4.94), asn: 20473(-2.01), country: US(-0.05)]; DKIM_TRACE(0.00)[sibptus.ru:+]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.29 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, 03 Dec 2019 09:49:13 -0000 --fwqqG+mf3f7vyBCB Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Morgan Wesstr=F6m wrote: > > Do you mean to say that a state checks not only address:port pairs, but > > also TCP flags? This is a new notion for me. What would be a "pass" rule > > to create a "catch all" state with no regard for TCP flags? >=20 > For TCP it checks the flags when the state is created. From man pf.conf Forget TCP for now, let's explain the ICMP ping case I posted earlier. [dd] > > I'm afraid this is an incorrect assumption. According to man pf.conf, by > > default "state-policy=3Dfloating" and state is not bound to interfaces. > > The output of "pfctl -s state" does not indicate any interfaces either, > > just protocols, addresses and ports. > >=20 >=20 > This is weird. My state tables clearly shows the interface name first on= =20 > the line instead of "all" but I use state-policy if-bound. I have no=20 > experience with floating mode, thus my assumptions earlier. I apologize= =20 > if I was wrong. You need not apologize, my lab runs a very basic pf configuration where state-policy=3Dfloating by default. --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --fwqqG+mf3f7vyBCB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJd5i+XAAoJEA2k8lmbXsY08UcIAKL+1MJygcnbLik75fAwKl9B A1bk/xIXf89HJcDYGYgTia7Jz3caAVAJA20xzHVivuZRKLPczxNtKlqrPnRpTEi/ sttdywqck5m3NVafdEYZ2wasX+JaVrvDrn9MDvd2Z09s3QA8NgnuYVRB2sjWXrwf TQZ3d9rHw7fZdjz0ILdJbt90ARnlAHDD0gKXbKmWcor2+bOCdlMCIqAlYGcYI0xv Mno1YBUFWhR7qzYGTs1gSYVi2U2iwOYSzCwPau5zuJZS7hyOWgKGhYKBtX362BPf WZl+OvvI+FxGxAai68r2BeMfsOiRftxhBPsa5lMqfoCcnMkXTOVm9i3HhlqlNvA= =fJDX -----END PGP SIGNATURE----- --fwqqG+mf3f7vyBCB--