"or" blocks in IPFW2

Luigi Rizzo rizzo at icir.org
Mon Jul 18 09:09:01 GMT 2005

On Wed, Jul 13, 2005 at 05:57:53PM +0200, Oliver Fromme wrote:
> Hi,
> # ipfw add allow tcp from any to any \{ in recv fxp0 or out xmit fxp0 \}
> 04400 allow tcp from any to any in { recv fxp0 or out } xmit fxp0

surely the parser is not very robust and should complain :)

This said, the 'or' is a conjunction of individual options, 
and 'in' is one option and 'recv fxp0' is another one.

if you need something different you probably have to write separate rules.


> Of course, now the rule does something completely different
> which doesn't even make any sense.  Most confusingly, I
> don't get an error message or even a warning from the parser.
> Is this a bug in ipfw, or a bug in the manpage, or do I
> just misunderstand things?  Do I have to write two separate
> rules?
> Thanks in advance!
> Best regards
>    Oliver
> -- 
> Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
> Any opinions expressed in this message may be personal to the author
> and may not necessarily reflect the opinions of secnetix in any way.
> "Unix gives you just enough rope to hang yourself --
> and then a couple of more feet, just to be sure."
>         -- Eric Allman
> _______________________________________________
> freebsd-ipfw at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
> To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe at freebsd.org"

More information about the freebsd-ipfw mailing list