BANDWIDTHD Filter out local traffic?



  • I want to make Bandwidthd NOT score local traffic.
    I have been all over the net searching and found this ""  not((src net 192.168.1) and (dst net 192.168.1))  ""  to put in the filter .
    When I try it to match my subnet or as is Bandwidthd's service stops and will not start.

    Any tips on how to make this happen on PF 1.2.3?
    Thanks



  • I'm using:
    "ip and not ((src net 192.168.1) and (dst net 192.168.1))"
    Make sure to include the quotes.

    I can't work out how to drop arp and brodcast packets though, in theory something along the lines of the below should work but just causes the BandwidthD to not start.

    ""ip and not (((src net 192.168.1) and (dst net 192.168.1)) or (net 192.168.1.255) or (proto arp))"

    More info on the syntax can be found here http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man7/pcap-filter.7.html



  • Did you have to restart the router to make it work?
    I tried it again and the Bandwidth service stoppes and will not start after saving the code in the filter.



  • Sorry I had one too many "'s I've updated my post give that a go now.



  • That seemed to do the trick for the local traffic. Thanks
    Now I have two PF sense boxs
    each on it's own modem and on different LAn subnets with the OPT1 lan set up on each box with a static route. SO Users can access servers on each lan.

    Lan 1 168.0.x lan 2 is 168.25.x and opt 1 is 168.15.x  Is there a way to filter out traffic from either lan through the static route at the same time?



  • Dropping the tailing .1 should stop any internal traffic being filtered.

    "ip and not ((src net 192.168) and (dst net 192.168))"

    Or you could use a larger statement to catch individual connections. eg the below won't capture traffic between 192.168.1.x addresses and traffic between 192.168.1.x addresses and 192.168.25.x

    "ip and not (((src net 192.168.1) and (dst net 192.168.1) or ((src net 192.168.1) and (dst net 192.168.25)) or ((src net 192.168.25) and (dst net 192.168.1)))"



  • Thanks
    Dropping the 1 seems to have worked . Excellent!!


Log in to reply