SOLVED: How to configure a VPN to autoconnect?


#1

How does one configure a VPN to autoconnect at boot and when waking up from sleep?

The syslog file suggests that network manager does not have the password, but I can connect manually by clicking the wireless network icon on the top bar and selecting the VPN. Having to remember to do that is a big PITA.

I have configured a VPN to autoconnect in Gnome on Centos 7, so I know it should be possible on PureOS.


#2

The complaint in the syslog file is:

Failed to request VPN secrets #3: No agents were available for this request.


#3

Turns out the solution is simple, if non-obvious. The VPN password must be configured as “Store the password for all users” instead of “Store the password only for this user”.

You set that in the pop-up radio button menu which you get by clicking the little icon at the right side of the password entry field in the VPN configuration. (“Networks” in “Settings”)