Skip to content

Instantly share code, notes, and snippets.

@84adam
Last active June 3, 2016 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 84adam/1971ef3316bd8762985712b32bd4db41 to your computer and use it in GitHub Desktop.
Save 84adam/1971ef3316bd8762985712b32bd4db41 to your computer and use it in GitHub Desktop.
Install OpenVPN w/ Private Internet Access
Linux Command Line Setup of OpenVPN and Private Internet Access
# source: https://support.privateinternetaccess.com/Knowledgebase/Article/View/30
* 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.
1. sudo apt-get install openvpn _OR_ sudo yum ... _OR_ sudo zypper ...
2. cd /etc/openvpn
3. sudo wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
4. sudo unzip openvpn.zip (install 'unzip' first if needed)
5. ls -l (list all server config files; choose a region)
6. sudo openvpn 'server-config-filename-goes-here.ovpn'
Store Your Username and Password and Have OpenVPN Load Them Automatically
# source: https://my.hostvpn.com/knowledgebase/22/Save-Password-in-OpenVPN-for-Automatic-Login.html
1. cd /etc/openvpn
2. sudo vim auth.txt
3. Type your username on line 1, password on line 2; nothing more.
4. Save and exit this file.
5. sudo vim 'server-config-filename-goes-here.ovpn' (edit your chosen region's config file)
6. On the line which says "auth-user-pass" append the username/password filename "auth.txt".
7. The modified line should read as follows: auth-user-pass auth.txt
8. Save and exit.
9. If you have OpenVPN running in another terminal tab halt that process with 'Ctrl+C'.
10. 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/questions to adam@kernelmastery.com ]
[ View this gist on my blog at kernelmastery.com/openvpnpia ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment