Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.