i'm using ubuntu 10.10
i've a local backup user called "backup". :)
i would like to give this user just a bandwidth of 1Mbit. No matter which software wants to connect to the network.
this solution limits:
iptables -t mangle -A OUTPUT -p tcp -m owner --uid-owner 1001 -j MARK --set-mark 12
iptables -t mangle -A POSTROUTING -p tcp -m owner --uid-owner 1001 -j MARK --set-mark 12
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 2 htb default 1
tc filter add dev eth0 parent 2: protocol ip pref 2 handle 12 fw classid 2:6
tc class add dev eth0 parent 2: classid 2:6 htb rate 10Kbit ceil 1Mbit
tc qdisc show dev eth0
tc class show dev eth0
tc filter show dev eth0
I'm not sure if this can be done with tc, but how can I limit per user bandwidth? may be a good starting point.