This post assumes that you have set up a VPN connection on Ubuntu already that you are able to use, and will show you how to make that connection start on boot.
First, the easy step; tell your existing connection to automatically connect to the VPN:
- Open up “Network Connections”
- Highlight your default network connection
- Click edit
- Choose the “General” tab
- Check the box “Automatically connect to VPN when using this connection” and choose your VPN connection
Stop the Keyring Prompt
At this point, if you restart your machine, you’ll be prompted to enter your keyring:
To make this go away on boot, navigate to /etc/NetworkManager/system-connections and look for a file named after your VPN connection. For me, it was “pia-toronto(openvpn)”. In this file, make two changes:
- Under the “[vpn]” section, remove the “password-flags=1” line.
- Add a new section, “[vpn-secrets]” to the file with your VPN account password underneath it:
And now you should be good to go.