How to set Maximum Bandwidth allowance for OpenVPN?

Use this forum to share your VPN or network disasters. Show diagrams, traffic graphs, or whatever else you need (a video of you letting the 'smoke' out of our network gear).
Post Reply
Novun
OpenVpn Newbie
Posts: 1
Joined: Sun Sep 10, 2017 4:57 pm

How to set Maximum Bandwidth allowance for OpenVPN?

Post by Novun » Mon Aug 27, 2018 5:32 pm

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.

Post Reply