Limiting client bandwidth with PF

Michal Buchtik buchtajz at borsice.net
Wed Jul 23 15:54:52 UTC 2008


Walter Venable píše v st 23. 07. 2008 v 16:03 +0300:
> First things first, limit them to 128Kbps, but that isn't even working, as
> clients are still maxing at 3Mbps:
> 
> $ cat /etc/pf.conf
> int_if="rl0"
> ext_if="nfe0"
> int_net="192.168.2.0/24"
> 
> altq on $ext_if hfsc bandwidth 3Mb queue { clients }
> queue clients bandwidth 128Kb hfsc ( default rio )
> pass in quick log on $int_if proto tcp from $int_net to any \
>  flags S/SA keep state queue clients
> 
You can limit only OUTGOING traffic (from router point of view). So
change the line to:

 altq on $int_if hfsc bandwidth 3Mb queue { clients }


Michal



More information about the freebsd-pf mailing list