I'm writing software for bandwidth management in Linux. I use TC for bandwidth shaping, and it worked fine. I want to limit user bandwidth for a period of time. For example:
- For user 1, 100MB in a week
What is the best way to do it?
You can add an iptables rule for each IP and use it to count the traffic that passed through the rule. Just add 2 rules for each IP:
And then you can get the results with
This one is zero but the
After that all you need is a