From owner-freebsd-ipfw@freebsd.org Wed Jun 8 10:37:00 2016 Return-Path: Delivered-To: freebsd-ipfw@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 CD8D2B6F903 for ; Wed, 8 Jun 2016 10:37:00 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx2.freebsd.org", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7D241518; Wed, 8 Jun 2016 10:37:00 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 672B566D67; Wed, 8 Jun 2016 10:36:58 +0000 (UTC) (envelope-from ae@FreeBSD.org) Subject: Re: IPFW: more "orthogonal? state operations, push into 11? To: Ian Smith References: <9229d4f7-8466-57b0-c954-117736102bd7@FreeBSD.org> <5755F0D3.9060909@FreeBSD.org> <20160607220136.R15883@sola.nimnet.asn.au> Cc: freebsd-ipfw@freebsd.org, "Alexander V. Chernikov" , lev@freebsd.org, Julian Elischer From: "Andrey V. Elsukov" Message-ID: <5757F533.8070907@FreeBSD.org> Date: Wed, 8 Jun 2016 13:36:35 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <20160607220136.R15883@sola.nimnet.asn.au> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xOITXn1oB5rwCOQoPtVqiPBUeh7J4aVPt" X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 10:37:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xOITXn1oB5rwCOQoPtVqiPBUeh7J4aVPt Content-Type: multipart/mixed; boundary="gTPAdF5CHc0LSPHQSOWlax3wDqkGDV1vX" From: "Andrey V. Elsukov" To: Ian Smith Cc: freebsd-ipfw@freebsd.org, "Alexander V. Chernikov" , lev@freebsd.org, Julian Elischer Message-ID: <5757F533.8070907@FreeBSD.org> Subject: Re: IPFW: more "orthogonal? state operations, push into 11? References: <9229d4f7-8466-57b0-c954-117736102bd7@FreeBSD.org> <5755F0D3.9060909@FreeBSD.org> <20160607220136.R15883@sola.nimnet.asn.au> In-Reply-To: <20160607220136.R15883@sola.nimnet.asn.au> --gTPAdF5CHc0LSPHQSOWlax3wDqkGDV1vX Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07.06.16 17:31, Ian Smith wrote: > If your patch does what Lev wanted to achieve with (I thought too many)= =20 > new dynamic rule actions, then I think your simpler solution is better,= =20 > not least because it's far easier to understand for non-Julians :) >=20 > Looking from a useability and documentation perspective only - I won't = > even be looking at this code - I have a few thoughts: >=20 > Thus far, keep-state and limit seem to be interchangeable options; limi= t=20 > rules will need to work the same with respect to named dynamic flows; d= o > I assume that you've just started with only keep-state for testing? We don't use limit rules at all, so it wasn't implemented. I think it will not so hard to implement. > I think flow names should be specified as an _optional_ parameter, thus= : >=20 > check-state [name] >=20 > keep-state [name] >=20 > limit {src-addr | src-port | dst-addr | dst-port} N [name] >=20 > where name (maybe flowname, for easier comprehension by man readers?) i= s=20 > optional, assigned as 'default' whenever omitted - as well as being for= =20 > backwards ruleset compatibility, which then only needs mentioning once,= =20 > and maybe also put another way in the STATEFUL FIREWALL section. >=20 > So a few of the existing example rules with no name could stand, while = > others (see below) append names of OUTBOUND and INBOUND or whatever. >=20 > As is, you have=20 >=20 > 740 .It Cm check-state Op Ar name | Cm any | Cm default >=20 > which in other contexts would mean you have to supply one of 'name' or = > 'any' or 'default' when you don't have to provide one, 'default' being = > assigned otherwise. Otherwise I think this is fairly well described. >=20 > Will 'ipfw -[e]d list|show' show the flow names? or the indices? It will show the flow name at the end of line. > As I pestered Lev about last year, we still need a small example rulese= t=20 > section that actually deals with potentially problematic stateful issue= s=20 > with NAT - which I still don't fully understand - beyond descriptions i= n=20 > the abstract case; ie an actual working dual- or multi-flow example. >=20 > I know these are "just doc" issues of little importance while testing=20 > working code, and I haven't supplied any patches, so are just FWIW .. Will try to implement support for limit rules and update man. Thanks. --=20 WBR, Andrey V. Elsukov --gTPAdF5CHc0LSPHQSOWlax3wDqkGDV1vX-- --xOITXn1oB5rwCOQoPtVqiPBUeh7J4aVPt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXV/UzAAoJEAHF6gQQyKF6+O8H/26bc+g8wn0utsHj4Qo3Ldwu Z6FGtyitPds+UCaWVqpZxOFzYdoeQ8S97M/kbkYwn4/G6v1iBkW240pqsOZF5xX4 xjeheSPuR4UWUOtKsBc2k5YdIRnlpa8S7p49lCzSzGPaslsbOaGlZDy03+7iyU34 7MqdE4V+iEFa4bh5EqJAZe7ivBMKStsfrtZdByiq1UPNNUBe2I/mOeLkvOVb9rtO RKPai28I98wfxRFT655krQtYkAi5nWlSDUc0CpqPaQIsnZ7rVuGaQKiR/WMS63c0 xe4zGr/cOSkSQ3kZzVtKXCgktgrGUxDYh2DFGxnMilSLvoewrtVW68xVZwbwsBE= =bF8N -----END PGP SIGNATURE----- --xOITXn1oB5rwCOQoPtVqiPBUeh7J4aVPt--