Re: Iptables connbytes

Linux Advanced Routing and Traffic Control

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

 



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@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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