Page 1 of 1

How to set Maximum Bandwidth allowance for OpenVPN?

Posted: Mon Aug 27, 2018 5:32 pm
by Novun
Hey there!

I have a few VPS servers running OpenVPN. It's all awesome and works perfectly. However, some providers limit how much bandwidth you can use within their plan.

For example: 250GB BW, 500GB BW, Etc...

After the limit is reached they bill you for the overage. Is there a way to set in OpenVPN or iptables or wherever, that when I reach a certain amount of bandwidth it drops all connections or something?
The goal is not to pay unnecessarily if I don't notice I'm over the bandwidth allowance. At that point, I can switch to another server.

I'm using either Centos 6 or 7 usually.

Can this be done? Maybe with iptables? Did I miss something obvious?

Thanks for your help!

Notice I don't want to throttle speed, (I found plenty of info on that) just the amount of data transferred.