Applying QoS or Similar to OpenWrt OpenVPN Server

I have an OpenVPN Server (tun0 interface) set up on an OpenWRT build. (People connect through WAN and access the internet through WAN so no LAN connections.)
However, my concern is that quite a bit of people (5 or more) use this in limited bandwidth, so I would like to apply QoS or a similar method that stabilizes the OpenVPN throughput.
Are there any methods that make this possible?
Thank you very much in advance.

My first suggestion here would be to rent yourself a couple bucks a month of VPS from Linode or DigitalOcean or something and get something that has enough bandwidth to be a VPN server for your 5 or more people. Digital Ocean droplets start at $5/mo for 1TB/mo transfer. You might want the $15/mo for 3TB transfer for 5 + people.

Barring that, try putting SQM with piece_of_cake on the tun0 interface and see if that helps. You'll probably want to set some unusual packet accounting overheads here. A first place to start might be Ethernet with overhead and an overhead of around 88 bytes or something (this is just a wild guess by doubling the upper end of what you'd put for an unencapsulated packet stream).

1 Like

Well, variable bandwidth links like WiFi do not play well with sqm, as the shapers really require fixed bandwidth configuration, and wifi bandwidth changes to quickly for reasonable tracking. You could/should try an AP with ath9k wifi and exploit the airtime fairness mode in OpenWrt master, which should at least avoid anybody hogging the RF link.

Great, that solves part of the problem :wink: