OpenVPN cannot connect when blocking all connections without VPN

Here is my setup:

  • Device: Teracube 2e
  • Android version: 12
  • /e/OS version: 1.19.1-s-20240109372023-stable-emerald
  • VPN: OpenVPN for Android from F-Droid (de blinkt openvpn) 0.7.51
  • VPN Provider: bytzvpn
  • OpenVPN profile: See footnote

Here is how to reproduce the problem:

  • Disable all Advanced Privacy features (to simplify the test)
  • Forget all VPN
  • Save the OpenVPN profile: See footnote
  • Install: OpenVPN for Android from F-Droid (de blinkt openvpn) 0.7.51
  • Open: OpenVPN
  • Click on the box with a downward arrow in the top right corner
  • Select the OpenVPN profile where it is saved
  • Back to OpenVPN: Save the profile
  • Choose the profile
  • Enter the username and password for the VPN

Here, the VPN should connect.

  • Go to Settings/Network & internet/VPN
  • Press on the gear logo beside OpenVPN for Android
  • Turn on: Always-on VPN
  • Turn on: Block connections without VPN
  • Turn off the WIFI
  • Disconnect the VPN profile in OpenVPN
  • Connect the VPN profile in OpenVPN
  • Turn on the WIFI

Here, the VPN is stuck at Waiting for usable network.

  • Turn off the WIFI
  • Disconnect the VPN profile in OpenVPN
  • Turn off: Block connections without VPN
  • Connect the VPN profile in OpenVPN
  • Turn on the WIFI

Here, the VPN should connect.

Ever since I updated /e/OS to an Android 12 version in August/September last year, OpenVPN cannot reconnect when the option Block connections without VPN is enabled.

How do I fix this problem?

Footnote:
OpenVPN profile

This sounds like it may be the same ongoing issue I’ve had since the 1.9s / Android 12 upgrade to my Fairphone 3+ last year.

I’ve an open issue on GitLab about it
https://gitlab.e.foundation/e/backlog/-/issues/6793

The workaround I’ve found:

a) where wi-fi and mobile data are both turned on, turning off wi-fi usually allows a VPN connection to be made with mobile data which is maintained when wi-fi is turned back on (failing that, turning both wi-fi and mobile data off then back on works),

b) where mobile data only is on, turning it off then back on allows the VPN to connect.

I need to do this whenever I restart the phone or change VPN server, or when VPN connection is otherwise lost.

Also, if a connection has already been made with ‘block connections without VPN’ turned off, I found that the connection is maintained when this setting is turned back on.

If you think this is the same issue you have it may be worth considering adding a comment to the GitLab issue above.

1 Like

This topic was automatically closed after 60 days. New replies are no longer allowed.