IPFW: more "orthogonal? state operations, push into 11?

Andrey V. Elsukov ae at FreeBSD.org
Wed Jun 8 10:37:00 UTC 2016


On 07.06.16 17:31, Ian Smith wrote:
> If your patch does what Lev wanted to achieve with (I thought too many) 
> new dynamic rule actions, then I think your simpler solution is better, 
> not least because it's far easier to understand for non-Julians :)
> 
> Looking from a useability and documentation perspective only - I won't 
> even be looking at this code - I have a few thoughts:
> 
> Thus far, keep-state and limit seem to be interchangeable options; limit 
> rules will need to work the same with respect to named dynamic flows; do
> 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:
> 
>     check-state [name]
> 
>     keep-state [name]
> 
>     limit {src-addr | src-port | dst-addr | dst-port} N [name]
> 
> where name (maybe flowname, for easier comprehension by man readers?) is 
> optional, assigned as 'default' whenever omitted - as well as being for 
> backwards ruleset compatibility, which then only needs mentioning once, 
> and maybe also put another way in the STATEFUL FIREWALL section.
> 
> 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.
> 
> As is, you have 
> 
> 740		.It Cm check-state Op Ar name | Cm any | Cm default
> 
> 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.
> 
> 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 ruleset 
> section that actually deals with potentially problematic stateful issues 
> with NAT - which I still don't fully understand - beyond descriptions in 
> the abstract case; ie an actual working dual- or multi-flow example.
> 
> I know these are "just doc" issues of little importance while testing 
> 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.

-- 
WBR, Andrey V. Elsukov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ipfw/attachments/20160608/929cc970/attachment.sig>


More information about the freebsd-ipfw mailing list