Linux Command Line Setup of OpenVPN and Private Internet Access
[ source: support.privateinternetacces.com ]
- Use the following instructions to install OpenVPN via the command line in Linux.
- This set-up has been known to work with several unsupported versions of Linux, as well as the supported Ubuntu.
- This worked on my machine running openSUSE LEAP 42.1.
- You will be prompted to enter your PIA username and password after step 6; have those ready.
INSTRUCTIONS
sudo apt-get install openvpn
orsudo yum ...
(on RedHat/Fedora/CentOS)
orsudo zypper ...
(on openSUSE)cd /etc/openvpn
sudo wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
sudo unzip openvpn.zip
(install 'unzip' first if needed)ls -l
-- List all server config files; choose a region.sudo openvpn 'server-config-filename-goes-here.ovpn'
Store Your Username and Password and Have OpenVPN Load Them Automatically
[ source: my.hostvpn.com ]
INSTRUCTIONS
cd /etc/openvpn
sudo vim auth.txt
- Type your
username
on line 1,password
on line 2; nothing more. - Save and exit this file. (e.g.
:wq
in vim) sudo vim 'server-config-filename-goes-here.ovpn'
-- Edit your chosen region's config file.- On the line which says "
auth-user-pass
" append the username/password filename "auth.txt
". - The modified line should now read as follows:
auth-user-pass auth.txt
- Save and exit.
- If you have OpenVPN running in another terminal tab halt that process with
Ctrl+C
. - Start OpenVPN again:
sudo openvpn 'server-config-filename-goes-here.ovpn'
Your VPN should now initialize without prompting you for your username/password.
- Send feedback and/or questions to me at [email protected].
- View this gist and download the instructions from GitHub.