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?