IPFW: more "orthogonal? state operations, push into 11?
Ian Smith
smithi at nimnet.asn.au
Thu Aug 4 18:14:13 UTC 2016
On Fri, 5 Aug 2016 00:12:37 +0800, Julian Elischer wrote:
> On 4/08/2016 6:50 PM, Andrey V. Elsukov wrote:
> > On 04.08.16 06:42, Julian Elischer wrote:
> > > so it's a combination of #1 and #2 in my list. I think I originally
> > > thought of having just #1.
> > >
> > > A combination is less useful for me as you need to do:
> > >
> > > 20 skipto 400 tcp from table(2) to me setup record-state
> > > 21 skipto 400 tcp from table(2) to me setup
> > > to make the entire session do the same thing.
> > So, in your example what wrong with just using keep-state?
> > "record-state without immediate action" == "keep-state without implicit
> > check-state" needed to solve issues with NAT or something similar, that
> > was described by Lev.
> >
> because keep-state is a check-state for ALL packets going past, regardless of
> whether they match the pattern.
>
> at least that's what I have observed.
Except now(?) with named states/flows/whatever, isn't it the case that
check-state [flowname] only affects packets with same state/flowname? So
you can clearly separate, say, packets on different interfaces, packets
coming or going on any interface, and such?
If I'm understanding that right - quite possibly not! - then only those
packets will match, and others with other names (including 'default')
won't match states with that name. I'm not sure I'm expressing this at
all well, because I'm only just starting to get any sort of grip, but
I'm liking the idea and wondering if it's sufficient for starters.
To me, orthogonality implies the least number of commands/instructions
that will accomplish the desired functionality. First, let's find out
what can and cannot be accomplished with named states/flows .. I'm yet
to understand what record-state-without-action can accomplish apart from
that .. it could work only for the first packet I suppose, since once
state is established, further packets will match and follow state, no?
Again, I find concrete examples - like the use of valtype skipto,fib
mentioned above - really helpful, essential really, for bears of such
little brain as I ..
cheers, Ian
More information about the freebsd-ipfw
mailing list