wondershaper + htb limiting ftp sends
This is still not working correctly. Wondershaper + htb by itself limits everything to the speed specified in the config.
I only want to limit my ftp upload speed.
I tried the suggestion below, but either I am not doing it right or it doesnt work correctly.
I only want to limit ports 50000-60000 since they are my passive ftp port range.
Or, ideally, I would like to limit proftpd itself...howeve there doesn't seem to be a way to do that with linux. Windows can but I guess Linux cant.
Is there a way to limit just ftp sends and leave everything else alone?
Mark
Quoted 27 lines · mark ryan
If i use the following tc command, where do i set the speed limit for the outbound ftp traffic?
Mark
Quoted 20 lines · Corey Hickey
Quoted 7 lines · mark ryan
Is there a way to apply wondershaper w/ htb to a port range?
I have a ftp server on port 65432 and passive ports 50000-60000.
Is there a way to set a range? or do they have to be individually
listed?Quoted 9 lines
The following doesnt seem to work:
# low priority source ports NOPRIOPORTSRCe432, 50000:60000# low priority destination ports NOPRIOPORTDST>>> MarkI don't know about wondershaper specifically, but you can use
iptables.
Quoted 9 lines
Quoted 9 lines
I think this will work:
iptables -t mangle -A FORWARD -m tcp -p tcp -s <your.ftp.server.ip> \
--sport 65432 -j MARK --set-mark0x02
iptables -t mangle -A FORWARD -m tcp -p tcp -s <your.ftp.server.ip> \
--sport 50000:60000 -j MARK --set-mark0x02Then, you need to add a tc filter:
Quoted 9 lines
Quoted 7 lines
tc filter add dev <your-outgoing-interface> parent 1: protocol ip \
prio 1 handle0x02fw flowid 1:30Try it out...
-Corey
[Sorry, I wasn't paying attention and sent my original reply to the poster instead of the list]
The filter I sent ought to direct traffic into wondershaper's "bulk" class, on line 71, which is:
tc class add $DEV parent 1:1 classid 1:30 htb rate $[8*$UPLINK/10]kbit \
burst 6k prio 2
As you can see, the rate is eight tenths the speed of $UPLINK. Since there is no ceiling specified, however, it is allowed to "borrow" bandwidth up to the speed of its parent, which is $UPLINK. If you want to change the behavior of this class, read how here:
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
-Corey
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/