You are not logged in.

#1 2019-01-26 18:23:42

Starclimber
Member
From: Mars
Registered: 2018-12-23
Posts: 13

OpenVPN client not reconnecting after suspend wakeup

Hi everyone,

I'm running OpenVPN as a client on my laptop and I always have to manually restart it after waking from suspend. A workaround is presented here on the Arch wiki

Client daemon not reconnecting after suspend

which I will use for now but I'm looking for a long-term (non-workaround) solution. I'm not savvy with debugging networking problems (or networking in general) but the problem appears to arise from the routing table configuration after wakeup.

Before suspend:

$ ip route show
0.0.0.0/1 via 10.8.3.1 dev tun0 
default via 192.168.0.1 dev wlp3s0 proto dhcp metric 600 
10.8.3.0/24 dev tun0 proto kernel scope link src 10.8.3.3 
128.0.0.0/1 via 10.8.3.1 dev tun0 
REDACTED_VPN_IP_ADDRESS via 192.168.0.1 dev wlp3s0 
192.168.0.0/24 dev wlp3s0 proto kernel scope link src 192.168.0.10 metric 600 

After wakeup:

$ ip route show
0.0.0.0/1 via 10.8.3.1 dev tun0 
default via 192.168.0.1 dev wlp3s0 proto dhcp metric 600 
10.8.3.0/24 dev tun0 proto kernel scope link src 10.8.3.3 
128.0.0.0/1 via 10.8.3.1 dev tun0 
192.168.0.0/24 dev wlp3s0 proto kernel scope link src 192.168.0.10 metric 600 

The VPN IP address route is never added back on wake-up. Could someone explain why this might be happening? Should I consult the OpenVPN maintainers?

Additional information:

This happens independent of the networking device or network management software I use. I am also using the update-resolv-conf script.

Last edited by Starclimber (2019-01-26 18:24:26)

Offline

#2 2019-01-26 18:31:05

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: OpenVPN client not reconnecting after suspend wakeup

I haven't experienced that before (network manager).  Doesn't help your use-case, but have you tried using wireguard instead of openvpn?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2019-01-27 14:50:48

Starclimber
Member
From: Mars
Registered: 2018-12-23
Posts: 13

Re: OpenVPN client not reconnecting after suspend wakeup

@graysky I have not. I'll take a look at wireguard.

Offline

Board footer

Powered by FluxBB