0

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.

PersonalNexus
  • 292
  • 2
  • 11

2 Answers2

2

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.

Farhan
  • 4,269
  • 11
  • 49
  • 80
  • 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
1

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.

Sirex
  • 5,499
  • 2
  • 33
  • 54