2

I have a vps server with Plesk Panel running on Centos 6.5.

I'm using Openvpn AS and I'm wondering whether there's a way to limit the bandwidth per user (openvpn local user).

2

see the openvpn documents:

OpenvpnDoc

qoute:

--shaper n Limit bandwidth of outgoing tunnel data to n bytes per second on the TCP/UDP port. If you want to limit the bandwidth in both directions, use this option on both peers. OpenVPN uses the following algorithm to implement traffic shaping: Given a shaper rate of n bytes per second, after a datagram write of b bytes is queued on the TCP/UDP port, wait a minimum of (b / n) seconds before queuing the next write.

It should be noted that OpenVPN supports multiple tunnels between the same two peers, allowing you to construct full-speed and reduced bandwidth tunnels at the same time, routing low-priority data such as off-site backups over the reduced bandwidth tunnel, and other data over the full-speed tunnel.

Also note that for low bandwidth tunnels (under 1000 bytes per second), you should probably use lower MTU values as well (see above), otherwise the packet latency will grow so large as to trigger timeouts in the TLS layer and TCP connections running over the tunnel.

OpenVPN allows n to be between 100 bytes/sec and 100 Mbytes/sec.

You should add a client config file for this user.

However, this makes the whole situation pretty useless as the client can override the setting. If you only set it on the server its for all clients and only outgoing traffic from the server.

At best you should check out other ideas like doing this with iptables.

see the discussion on the OpenVPN users lists about this OpenVPN User List

  • +1 for iptables, I'll take a look at that, thanks! – Leonardo Gandini Jan 21 '14 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.