Am Wed, Jan 03, 2024 at 05:50:52PM +0100 schrieb Florian Gamböck:

[snip]

What bugs me however is, that OpenVPN loses connection to the VPN server
after such an AP change and is not able to reconnect automatically
again.

[snip]

While this is happening, I cannot access the internet. I suspect, this
is because of the "persist-tun" setting in the OpenVPN config, but I
don't want to remove it because I'd rather have no internet at all than
having suddenly internet without VPN ("kill switch").

I can manually "repair" this situation by sending SIGHUP to OpenVPN,
which causes a hard reconnect.

Now, with this background information, I need your help to come up with
a strategy to survive an automatic Mesh WiFi reconnect, without the need
of manually restarting OpenVPN all the time.

I’ve encountered the same issue as you. I fixed it by removing the persist-tun option from my configuration file.

The way I understand this configuration option, is that OpenVPN allows itself to destroy and recreate tun interfaces if needed. I’m not sure whether it means you may end up on the internet without going through your VPN.

What I’m sure of is that sending SIGHUP to OpenVPN tells it to destroy and recreate that tun interface of yours, bypassing the persist-tun instruction you gave it in your configuration file.

Others may have more satisfying answers than mine, but I believe the appropriate way to fix your issue is by allowing OpenVPN to recreate tun interfaces when needed, such as after a disconnect, and so you need to remove the persist-tun option. You might want to wait confirmation from other people around before doing so, though.

I’d be very interested if anyone had further information on that matter, whether they would contredict my claims or support them.

Hoël

Attachment: signature.asc
Description: PGP signature

Reply via email to