OpenVPN Configuration - Using PIA

From Da Nerd Mage Wiki
Jump to navigation Jump to search

Enter the OpenVPN folder

  • cd /etc/openvpn

Download the Private Internet Access OpenVPN configuration files (extension .ovpn)

  • sudo wget --no-check-certificate https://www.privateinternetaccess.com/openvpn/openvpn.zip

Unzip the openvpn configuration files

  • sudo unzip openvpn.zip

You can list all of the countries you can connect to with this command inside the /etc/openvpn folder

  • ls -lh *.ovpn

See the long list, you will specify the ovpn file when you connect to Private Internet Access’s VPN servers

-rw-r--r-- 1 root root 238 Nov 25 20:47 AU Melbourne.ovpn
-rw-r--r-- 1 root root 228 Nov 25 20:47 AU Sydney.ovpn
-rw-r--r-- 1 root root 231 Nov 25 20:47 Brazil.ovpn
-rw-r--r-- 1 root root 227 Nov 25 20:47 CA North York.ovpn
-rw-r--r-- 1 root root 235 Nov 25 20:47 CA Toronto.ovpn
-rw-r--r-- 1 root root 232 Nov 25 20:47 Denmark.ovpn
-rw-r--r-- 1 root root 231 Nov 25 20:47 France.ovpn
-rw-r--r-- 1 root root 232 Nov 25 20:47 Germany.ovpn
-rw-r--r-- 1 root root 227 Nov 25 20:47 Hong Kong.ovpn
-rw-r--r-- 1 root root 227 Nov 25 20:47 India.ovpn
-rw-r--r-- 1 root root 232 Nov 25 20:47 Ireland.ovpn
-rw-r--r-- 1 root root 231 Nov 25 20:47 Israel.ovpn
-rw-r--r-- 1 root root 230 Nov 25 20:47 Italy.ovpn
-rw-r--r-- 1 root root 230 Nov 25 20:47 Japan.ovpn
-rw-r--r-- 1 root root 231 Nov 25 20:47 Mexico.ovpn
-rw-r--r-- 1 root root 227 Nov 25 20:47 Netherlands.ovpn
-rw-r--r-- 1 root root 227 Nov 25 20:47 New Zealand.ovpn
-rw-r--r-- 1 root root 227 Nov 25 20:47 Romania.ovpn
-rw-r--r-- 1 root root 231 Nov 25 20:47 Russia.ovpn
-rw-r--r-- 1 root root 227 Nov 25 20:47 Singapore.ovpn
-rw-r--r-- 1 root root 231 Nov 25 20:47 Sweden.ovpn
-rw-r--r-- 1 root root 230 Nov 25 20:47 Switzerland.ovpn
-rw-r--r-- 1 root root 231 Nov 25 20:47 Turkey.ovpn
-rw-r--r-- 1 root root 234 Nov 25 20:47 UK London.ovpn
-rw-r--r-- 1 root root 239 Nov 25 20:47 UK Southampton.ovpn
-rw-r--r-- 1 root root 238 Nov 25 20:47 US California.ovpn
-rw-r--r-- 1 root root 232 Nov 25 20:47 US East.ovpn
-rw-r--r-- 1 root root 235 Nov 25 20:47 US Florida.ovpn
-rw-r--r-- 1 root root 235 Nov 25 20:47 US Midwest.ovpn
-rw-r--r-- 1 root root 239 Nov 25 20:47 US New York City.ovpn
-rw-r--r-- 1 root root 235 Nov 25 20:47 US Seattle.ovpn
-rw-r--r-- 1 root root 241 Nov 25 20:47 US Silicon Valley.ovpn
-rw-r--r-- 1 root root 233 Nov 25 20:47 US Texas.ovpn
-rw-r--r-- 1 root root 232 Nov 25 20:47 US West.ovpn

Create a login details text file so you can log on to the PIA VPN automatically

  • sudo vim /etc/openvpn/login.txt

Input your username and password, replace username with your actual username and password with your actual VPN password in this format

username
password

Change the permission of the login.txt file so it is only owned by root which will solve this error WARNING: file '/etc/openvpn/login.txt' is group or others accessible

  • sudo chmod 700 /etc/openvpn/login.txt