Skip to content

Instantly share code, notes, and snippets.

Last active Jun 3, 2016
What would you like to do?
Install OpenVPN w/ Private Internet Access
Linux Command Line Setup of OpenVPN and Private Internet Access
# source:
* 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
4. sudo unzip (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:
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 ]
[ View this gist on my blog at ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment