Install Pritunl and it should include a CLI pritunl-client
https://client.pritunl.com/#install
sudo tee /etc/apt/sources.list.d/pritunl.list << EOF
deb https://repo.pritunl.com/stable/apt focal main
EOF
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A
sudo apt-get update
sudo apt-get install pritunl-client-electron
Import your profiles. Only pritunl://
URLs are supported.
pritunl-client import pritunl://...
This should show a list of IDs and Names of profiles to connect with.
pritunl-client list
Using the list from pritunl-client list
, pick an ID to connect to. The ID can be partially specified for convience too.
pritunl-client start myidpartial --mode=ovpn --password=...
Check that the connection is online.
pritunl-client list
To use a 2FA token with a password simply append the 2FA token to the end of the password.
Password | Token | Combined CLI Password |
---|---|---|
123456 |
654321 |
123456654321 |
DNS resolution is messed up with OpenVPN and systemd in Ubuntu, so you need to use this workaround.
Check for a new nameserver
.
cat /run/systemd/resolve/resolv.conf
Use the new nameserver
found with dig
to find the IP of a domain you want to use in the VPN.
dig +short @XXX.XXX.XXX.XXX my.sweet.url
Now use the IP found instead of the URL of the service wherever it is needed e.g. with SSH.
Thanks!
VPN worked fine for me on Ubuntu 22.04.