OpenVPN connection unusable after switch from cellular to wifi


is it normal that after switching from cellular to WiFi the OpenVPN connection has to be re-established? Every time the smartphone (Android with OpenVPN for Android app) connects from cellular to WiFi, it seems that the incoming traffic is blocked (visible in the statistics: incoming data transfer 0 kb). After reconnection everything is OK.

Is it perhaps a setting in the OpenVPN server or client?

Thanks for your help.

That sounds right since you are changing IP addresses from cell to wi-fi.

Once the connection is dropped, I am assuming you can reconnect when on wi-fi… is that correct?

Yes, after a reconnect everything works fine.

This behavior has not always been there. There was a time when it worked without a manual reconnect.

The other way around: If I am on the WIFI and then turn it off, the VPN connection remains after the phone has logged back into the cellular.

The openvpn client log might give some clues as to what is happening when the change from cellular to wifi takes place.

Also the log for when the connection goes from wifi to cellular would be interesting as that does not break the connection.

Without Seamless Tunnel (an option of OpenVPN Connect), the VPN tunnel owns the default route so when the client IP address changes, the tunnel drops and reconnects, disrupting internet access.

With Seamless Tunnel, the VPN tunnel runs alongside the default route. The client IP address can change without affecting the tunnel, maintaining continuous VPN access. Internet traffic uses the default route and is unaffected by IP changes.

Seamless Tunnel isolates VPN routing, allowing the tunnel to persist through client IP changes seamlessly without disrupting internet connectivity.

EDIT: In OpenVPN Connect for iOS there is an option called “Layer 2 reachability” which allows for a more robust transition between WIFI and Cellular. I do not remember whether this option is also available in android.

1 Like

I found an option “Reconnect on network change” which is ticked. Seems this is not working anymore. I’ll have a look late what happens after turning it off and on again.