Negative match based on Alias of multiple networks?

  • Can someone confirm that rule matching based on negative (not) aliases works?

    I have an alias of local network ranges.

    I'm trying to match traffic that has a src from that alias and destination not to that alias, to match traffic that will be routed to the Wan.

    Matching based on src = alias, dest = alias works just fine, but when I negate the dest != alias it doesn't seem to match the traffic that it should.

                            <max><max-src-nodes><max-src-conn><max-src-states><statetimeout><statetype>keep state</statetype>
    table <shaperlocallan>{ }
    ShaperLocalLAN = "<shaperlocallan>"
    match  out log  from   $ShaperLocalLAN to  ! $ShaperLocalLAN  queue (qP2P)  label "USER_RULE: Shaper - All - Default To Wan P2P"</shaperlocallan></shaperlocallan> 


  • Rebel Alliance Developer Netgate

    It should be working in the version of pf we have on 2.0. It certainly did not work for 1.2.x though.

    That said, using negation can usually be worked around by using two rules, a block and a pass, to achieve the same effect in a manner which is easier to read.

Log in to reply