Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 use a Debian Linux based PC as a router. Now, I want to implement bandwidth management using quotas. By that I mean when a user has reached their quota limit, their bandwidth will be reduced. I've searched for it online, but I haven't found any information on how to implement this.

share|improve this question

Instead of designing your own router, and doing so many customisation, you should better go for PfSense, which is an industry class firewall with Almost everything you need. It is opensource and free.

share|improve this answer
I don't hear about PfSense before.. Maybe, I should learn about it. Ok, thx for your suggestion. I will google how to implement my plan with PfSense. – Muhammad Resna Rizki Pratama Feb 27 '12 at 12:43
Yea, if you want a more heavy weight solution (and with 100 users it sounds like you do) i'd say go with this option. – Sirex Feb 27 '12 at 13:00
@Sirex pfsense is free solution and it has ability to handle more than 10-4000 users/server – Farhan Feb 27 '12 at 13:29
I know. I just meant heavyweight compared to cobbling something together in bash. pfsense is the way to go for the OP, i agree. – Sirex Feb 27 '12 at 15:23

I've never needed to do this, so i'm guessing here, but...

You may be able to do this with tc. I'd imagine its not the best solution though. Essentially you'd classify the traffic into groups then check how much ends up in each bucket, altering the bandwidth of the group when the limit is reached.

Another method might involve iptables, making a table for each user and then counting how much goes through each table.

share|improve this answer
hmm.. I have more than 100 users.. I can't do that.. That is not efficient.. hemm.. yeah I think that I can't do this with simple way.. – Muhammad Resna Rizki Pratama Feb 27 '12 at 12:36

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.