Re: [LARTC] Limit Bandwidth + limiting the amount of Bytes to download

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 29 May 2003 02:21, Osgaldo Suanzes wrote:
> Hi.
> Just wondering if it is possible for example :If I limit an IP Address to
> 512kb/s, if It is possible to
> stop him from using the net after he reaches a certain limit of bandwidth ,
> lets say 5 meg a day/week/ or month,year or whatever.
> I was thinking about maybe using a Packet counter like the one used at
> http://wipl-wrr.sourceforge.net/wipl.html or
>  http://bwmon.sourceforge.net/an and a script which activates a rule with
> IpTables that denys all traffic from/to that IP Address after
> the limit of total of max byte downloaded has been reached.
> I was trying to to find something regarded on the net about BW controller,
> watcher...etc
> But couldnt find anything, Does someone know if this has been done, and
> how?
My ISP is doing it, so it can be done :)  They don't block me, but the speed 
goes from 4mbit to 128kbit.

You can do it with iptables counters.  Read them each 15 minutes and count the 
bytes.  And trigger a script if it reaches it's maximum.  I don't think it's 
hard to implement.  If you do this, make sure you can detect a counter reset.

Stef

-- 

stef.coene@xxxxxxxxx
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux