Ubuntu Server 16.04 - Always on VPN (OpenVPN)

in #technology6 years ago (edited)


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/

Coin Marketplace

STEEM 0.31
TRX 0.12
JST 0.034
BTC 64418.55
ETH 3157.64
USDT 1.00
SBD 4.06