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

What's the simplest way to enforce a maximum download limit per machine on a network, over a period of time?

For example, 10 GB, per computer, per week?

I'm hoping maybe there's either a custom piece of hardware I can buy online, or some firmware that I could configure to do this (e.g. DD-WRT).

After the limit is up, I'd like it to either cut off the user's access, or throttle the user's download speed, or to notify me somehow.

Any suggestions?

share|improve this question

"Limit per machine" is a rather difficult task as machines usually are not authenticating themselves in any way and may change IP addresses at any time.

You could consider enforcing the use of a proxy like Squid, preferably with user authentication and an addon like Squish for accounting and limiting.

An approach without a proxy server could be tried using iptables' accounting facilities and some periodically-run scripting logic inserting REJECT rules for exceeding clients. This has the downside of not being bound to users and not being able to give meaningful messages like "your quota is exceeded" - it will just look like a connection problem.

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.