All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cezar Atanasiu <lartc@gmb.ro>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Iptables connbytes
Date: Tue, 04 Nov 2003 08:54:48 +0000	[thread overview]
Message-ID: <marc-lartc-106793712116428@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106789873319979@msgid-missing>

On Mon, 2003-11-03 at 23:31, Todor Neshev wrote:
> 	Hello,
> Is it possible to mark packets from particular IP and if it downloads
> over 100Kbytes, then it enters in CBQ shaper 32kbit/s for example ?
> My kernel is 2.4.22.
> If someone experimented with connection bytes patch please answer me.
> 

I did, and I am running it since I saw it first anounced on the list,
and works really smooth ( ymmv ).

I declare a download class and after that I mark the packets like this :
$i -t mangle -A PREROUTING -m connbytes --connbytes 307200: -j MARK
                                                        --set-mark 3

and then : 

$tc filter add dev $dev parent 1:0 protocol ip prio 1 handle 3 fw
                                                        classid 1:30

this allows me to do dynamic shaping, shaping that keeps track of
medium/large downloads and takes action when those are detected.

hope it helps.


> Regards,
> Todor Neshev
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
-- 
Cezar ATANASIU
GMB Computers
Departamentul Internet
Tel/fax: +40 241 619222/673199     


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

      reply	other threads:[~2003-11-04  8:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-03 21:31 [LARTC] Iptables connbytes Todor Neshev
2003-11-04  8:54 ` Cezar Atanasiu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-106793712116428@msgid-missing \
    --to=lartc@gmb.ro \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.