Results 1 to 4 of 4

Thread: restricting upload using htb

  1. #1
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46

    restricting upload using htb

    Hi, I know that it is possible to use wondershaper for QoS, but I do not need to priorize anything, I just want to restrict some services to a constant speed, since I use a shared connection and I do not want to take advantage of other people using the line.

    Actually, I want to restrict my DC++ running on port 4111 and I managed to
    restrict download using this script:
    Code:
    iptables -t mangle -A FORWARD -p tcp --dport 4111 -j MARK --set-mark 1
    tc qdisc add dev br0 root handle 1:0 htb default 0
    tc class add dev br0 parent 1:0 classid 1:1 htb rate 1024kbit
    tc class add dev br0 parent 1:1 classid 1:11 htb rate 256kbit
    tc filter add dev br0 parent 1:0 protocol ip handle 1 fw flowid 1:11
    br0 being my LAN interface. The downloading speed then did not exceeded 256 kbits and everything else was running at maximum speed. When I tried similar script for upload:
    Code:
    iptables -t mangle -A FORWARD -p tcp --sport 4111 -j MARK --set-mark 2
    tc qdisc add dev eth1 root handle 2:0 htb default 0
    tc class add dev eth1 parent 2:0 classid 2:1 htb rate 1024kbit
    tc class add dev eth1 parent 2:1 classid 2:11 htb rate 256kbit
    tc filter add dev eth1 parent 2:0 protocol ip handle 2 fw flowid 2:11
    ,
    only changes to previous script being replacing br0 by eth1, which is my WAN interface and using sport instead of dport. However, it did not work and the upload was still exceeding 1024 kbit, as it was before. I tried some changes to the script, but none did work. I am pretty sure there has t obe some way, but I am unable to find it.
    (I tried to use the web interface also...did not seem to work either:-/).
    Any ideas?

  2. #2
    did you figure this out? i need to limit uploads per ip addresses and can't do it either.

  3. #3
    Quote Originally Posted by xection
    did you figure this out? i need to limit uploads per ip addresses and can't do it either.
    i've managed to solve my problem with tc qdisc ingress
    you can probably use it too

  4. #4
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46
    well, dc++ uses random ports for upload, as I found later, so the only way is to priorize all services that you know are not dc++(like web or mail) and than shape upload for everything else

Similar Threads

  1. Problems with upload
    By enemista in forum WL-500g Q&A
    Replies: 9
    Last Post: 27-02-2006, 00:18
  2. Upload to FTP with dir-structure
    By nvn in forum WL-500g Q&A
    Replies: 6
    Last Post: 01-10-2005, 07:39
  3. upload command
    By kamilek in forum WL-500g Q&A
    Replies: 1
    Last Post: 10-08-2005, 08:15
  4. Replies: 3
    Last Post: 31-03-2005, 13:17
  5. Can't upload any firmware
    By Morcego in forum WL-500g Q&A
    Replies: 3
    Last Post: 17-09-2004, 01:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •