I have an Ubuntu server set up as a gateway for lots of clients, which connects them to the Internet.

I want to impose transmitted data limits on each of the clients (or IP address), e.g. 10 MBytes/day. How do I do that?

On the server, I run Squid as a transparent caching HTTP proxy, and a set of iptables rules that restrict some of the users from accessing the Internet at all. If I could use one of these apps for the limiting, it would be great. Or is it possible with tc? I'm not familiar with it, so I'd appreciate a more detailed answer if using tc.

I've seen questions here like https://serverfault.com/questions/116091/how-to-limit-user-quota-bandwidth-to-10gb-day - this one is too specific just for PHP servers. Other questions mainly ask about limiting transfer rate (kbps), but not total transferred data limits. I want to provide my users full available bandwidth, but only 10 MBytes of it a day.

Thank you for ideas.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.