mldonkey-users
[Top][All Lists]
Advanced

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

Re: [Mldonkey-users] Traffic shaping


From: Juan
Subject: Re: [Mldonkey-users] Traffic shaping
Date: Tue, 11 Mar 2003 18:08:40 +0100
User-agent: KMail/1.5

El Jueves, 6 de Marzo de 2003 18:51, escribiste:
> Juan <address@hidden> writes:
> > Hi! I'm trying to enhace the wondershaper script to restric the traffic
> > generated by mldonkey. I have created a mldonkey user with UID 1003 and I
> > want to mark every packet with iptables:
> >
> > address@hidden:~# iptables -A OUTPUT -t mangle -m owner --uid-owner 1003 -j
> > MARK --set-mark 1
> > iptables: Invalid argument
>
> This line works, try it:
> iptables -t mangle -A OUTPUT -m owner --uid-owner mldonkey -p tcp --dport
> 4001 -j MARK --set-mark 101
>
> The marking doesn't realy help you though. You will want to use
> connmark to mark this and all further packets of a connections
> (including incoming). But that needs patching the kernel.
>
> MfG
>         Goswin

Hi! thanx for the help. Now I can mark the packets of the mldonkey user, but 
I'm having a problem when mldonkey is running, when I'm browsing I receive a 
lot of errors:  "(113) No route to host". I'm using a modification of the 
wshaper script, and I think I don't fill the buffers of the router (an ADSL 
router). 

I have investigated about connmark and I have patched the kernel. But I don't 
know how to use it. I have tried this:

iptables -A OUTPUT -t mangle -m owner --uid-owner 1003 -j CONNMARK --set-mark 
1
iptables -A OUTPUT -t mangle -m connmark --mark 1 -j MARK --set-mark 1

I suppose that "CONNMARK" mark is different that "MARK" mark, isn't it? I 
don't know how to attach a filter with tc to filter by connmark, so I have 
done that little trick.
Should I put something in the INPUT chain? I'm lost.

address@hidden:~# iptables -L -t mangle
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
MARK       all  --  anywhere             anywhere           OWNER UID match 
mldonkey MARK set 0x1
CONNMARK   all  --  anywhere             anywhere           OWNER UID match 
mldonkey CONNMARK set 0x1
MARK       all  --  anywhere             anywhere           CONNMARK match 0x1 
MARK set 0x1

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination


Any help?
Thank you.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]