You are not logged in.

#1 2022-02-11 09:39:45

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 876

Restart openvpn client after suspend without typing username/password

I have a probably buggy openvpn configuration which gets broken after resume from suspend. I have not been able to understand what's wrong with it (maybe the network interface going down and up during suspend and resume screws it), so I decide to try to workaround it by restarting the service after resume. I found how to do this by creating a restart service for the openvpn service, but since my vpn connection is configured with auth-user-pass I have to retype username and password when the service is restarted. Is there a way to avoid this, so that after starting the vpn for the first time I don't have to retype the credentials when resuming from suspend?

Offline

#2 2022-02-11 20:59:33

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: Restart openvpn client after suspend without typing username/password

The openvpn --auth-user-pass option lets you specify a file with user/pass (see man). You could do that for your workaround and chmod 600 it.

Offline

#3 2022-02-12 08:50:16

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 876

Re: Restart openvpn client after suspend without typing username/password

Thanks Strike0, that works perfectly!

Offline

Board footer

Powered by FluxBB