Ubuntu Server 16.04 - Always on VPN (OpenVPN)
Ubuntu Server 16.04 - Always on VPN (OpenVPN)
This is a guide on how to set Ubuntu Server 16.04 to always be on, and basic troubleshooting of VPNs in ubuntu server. I used Private Internet Access (PIA) as an example VPN connection.
Here are the commands used in the video:
sudo su
apt-get install openvpn -y
cd /etc/openvpn
wget https://www.privateinternetaccess.com...
unzip openvpn.zip
rm openvpn.zip
nano .secrets
###PASTE YOUR INFO### p1234567
###PASTE YOUR INFO### MyPIAPassword
chmod 600 .secrets
mv 'US Texas.ovpn' texas.conf
nano texas.conf
###CHANGE THIS LINE### auth-user-pass .secrets
systemctl start openvpn@texas
systemctl status openvpn@texas
nano /etc/default/openvpn ###UNCOMMENT AUTOSTART
reboot
###Extra Tools###
Find External IP: dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}'
Debug as necessary: tail -f /var/log/syslog|grep ovpn
Posted from my blog with SteemPress : https://www.christitus.com/2018/09/10/ubuntu-server-16-04-always-on-vpn-openvpn/