Date: Thu, 21 Aug 2008 07:07:57 +0200 From: "Erik Danielsson" <eridan911@gmail.com> To: freebsd-pf@freebsd.org Subject: Re: Limiting bandwidth Message-ID: <c66fe0350808202207id862b91xc118e39cb86acb0f@mail.gmail.com> In-Reply-To: <48AC1BCE.3050109@quis.cx> References: <c66fe0350808200556m1c331936v3cfaea441176e455@mail.gmail.com> <48AC1BCE.3050109@quis.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks guys. One question remains though. To count the total traffic from a certain IP range, should a separate PF rule with a label be used? If so, how can I reset only the labels statistics whenever I want to? On Wed, Aug 20, 2008 at 3:27 PM, Jille <jille@quis.cx> wrote: > Erik Danielsson wrote: > >> Hello, >> >> I'm using PF together with ALTQ, but my need of limiting bandwidth has >> changed. I need to be able to limit the bandwidth from/to a certain IP >> range, but only once a specific amount of data has been transferred >> from/to >> that IP range. At midnight I want the counter to be reset, and everything >> should start over. >> >> For example, I want to allow, let's say 10 GiB from e.g 192.168.0.1/24, >> and >> once the 10GiB limit has been reached, I want to limit the bandwidth to xx >> kbits/s until midnight. >> Any ideas how to accomplish this, can it be done using PF and ALTQ? >> >> > afaik, you can only limit the bandwith with pf/altq and not count the total > usage, and use that in rules. > The best you can do (I think), is let pf create stats of the used > bandwidth, and let some script check whether they reached the 10GiB limit, > and if so add that rule to a table that limits bandwith. > and a script that resets the counters at midmight and flush the table. > > -- Jille > >> Regards >> Erik Danielsson >> _______________________________________________ >> freebsd-pf@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-pf >> To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org" >> >> >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c66fe0350808202207id862b91xc118e39cb86acb0f>