OpenVPN works great when you're connecting two tunnels over a stable, reliable connection. However, when one of the nodes is connected to the internet via an unstable internet connection (unstable: lots of dropped packets, inconsistent speed, constant out-of-order packets, high latency, etc.) OpenVPN will "fail" continuous timeouts and packet non-delivery regardless of whether the tunnel is being made over UDP or TCP.

Is there a software VPN platform that will perform adequately under such circumstances? I have tested PPTP but the result was subpar - it did not drop packets the way OpenVPN did, but the resulting connection was maybe 50 - 100x slower than w/out a tunnel.

Or are there options in the OpenVPN configuration file (either on the server- or client-side) that one may set to make it more resistant to lossy connections over badly-performing pipes?


With a bad connection, it will be hard to have a good VPN :) but the unique option I can think of is to use the keepalive directive with a small time period in openvpn config file if you are not using it already. This way as soon as your connection fails it will be restarted.

# The keepalive directive causes ping-like
# messages to be sent back and forth over
# the link so that each side knows when
# the other side has gone down.
# Ping every 10 seconds, assume that remote
# peer is down if no ping received during
# a 120 second time period.

# changing the default to every 5s and 20s time period
keepalive 5 20
| improve this answer | |
  • Is this config on the server or also the client? Any more tips than this? How can set the client to reconnect as fast as possible? – portforwardpodcast Feb 22 '14 at 0:36
  • 2
    This is on client side (the side that initiate the connection). It will reconnect as soon as it detects there is no connection (after the time period if no response). So if you reduce the 2nd parameter, it will detect faster but if you set it too slow, it can assume broken connection when the answer is only slow. – laurent Feb 22 '14 at 3:34

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.