OpenVPN

It's much simpler now to use OpenVPN on linux. For example

https://helpdesk.privateinternetaccess.com/hc/en-us/articles/219438247-Installing-OpenVPN-PIA-on-Linux
https://torguard.net/knowledgebase.php?action=displayarticle&id=138
http://serverfault.com/questions/458591/how-to-auto-start-openvpn-client-on-ubuntu-12-04-cli

To get it as a service, copy the ovpn to a .conf, then edit the default to start the conf file in question



apt-get install openvpn
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
unzip openvpn.zip

sudo cp ca.crt  US\ Midwest.ovpn /etc/openvpn
cd /etc/openvpn

to the bottom of the ovpn configuration file, add:

script-security-system 3 system
up /etc/openvpn/update-resolve-conf
down /etc/openvpn/update-resolve-conf

In ubuntu 17.10 and newer, systemd-resolved handles DNS

https://github.com/jonathanio/update-systemd-resolved

up /etc/openvpn/update-systemd-resolved
down /etc/openvpn/update-systemd-resolved
down-pre


# Start the client in direct mode to see any connections issues
sudo openvpn US\ Midwest.ovpn

(Observe that it connects correctly)

# Rename the file so that deamon mode automatically starts it
sudo mv US\ Midwest.ovpn USMidwest.conf
sudo service openvpn start

Comments