From: Ow Mun Heng Date: Wed, 20 Oct 2004 01:45:40 +0000 Subject: RE: [LARTC] bandwidth limitation per dynamic IP Message-Id: <1098236740.15286.6.camel@neuromancer.home.net> List-Id: References: <20041018160232.62509C127@postfix3-2.free.fr> In-Reply-To: <20041018160232.62509C127@postfix3-2.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On Wed, 2004-10-20 at 01:17, EC wrote: > >On Tue, 2004-10-19 at 00:03, EC wrote: > >> Hi, > >> > >> Is there a way to do the following with lartc tools : > >> I would like to limit any entering user to not use more than Xkb/mb to my > >> website. The IPs they use are changing all the time so static IP > >limitation > >> cannot be used. Is there a way doing so ? > > > >You Say "any entering users" > > > >If that case, then make a _general_ rule to throttle traffic from > >to/from port 80 > No. > There is a general bandwidth limitation for port 80. What I need is limiting > each user to never use more than Xkb EVEN if there is some bandwidth left > free. Wow.. You want to limit based on _per_ user? I'm not sure how that can be achieved. What I can think of is to have some sort of logwatcher (syslog-ng) coupled with swatch (?) and using it to feed into a program that can dynamically add the IP address into the IPtables FW mark. But seriously, What you're trying to do, to me, doesn't make much sense. If user A comes to your site, you give A 10kb/s (out of 50kb/s) If user B comes then, another 10kb/s is given. If you have 5 users concurrently then all the 50kb/s is used up. What happens when user #6 comes in then? U pump out 50kb/s? No such thing right? I think the general rule of _how_ much you want to feed out is more applicable for your needs. (correct me if I'm wrong of more info please). Say.. If you limit 50Kb/s for _all_ users, then it will be equally shared between _all_ users. -- Ow Mun Heng Fedora GNU/Linux Core 2 on D600 1.4Ghz CPU kernel 2.6.7-2.jul1-interactive Neuromancer 09:40:50 up 34 min, 9 users, load average: 0.85, 1.19, 1.18 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/