I have a 1GB upload cap on my internet connection.

Because of this, I want to hard limit my upload on my Debian machine to never exceed this cap in a given month.

After searching for how to do this for a while, every piece of info seems to be generalised traffic shaping to limit peak bandwidth, rather than setting monthly limits.

Eventually I stumbled across this guide, which implies what I want to do is possible with tc. However, this particular use case doesn't suit my needs as the bandwidth limits reset at the start of the calendar month and this seems to be a rolling limiter.

Ideally, I would like this to work in two tiers. The first is 900MB of carefree usage per calendar month, which can be used as quickly or as slowly as is needed. Once that has been used, the remaining 100MB should be allocated as is described in the guide linked above, accumulating in the bucket. Then, at the end of the calendar month, all limits are reset.

Is there a simple way to go about this?

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.