Step 4: Connect to PIA VPN
Click Network Manager > VPN Connections > PrivateInternetAccess VPN
You will see a yellowish colored connection indicator while connecting.
Setting up VPN on Ubuntu
Ubuntu parts were taken from PIA support site. This also covers Linux Mint or any Ubuntu variants.
This is almost as easy as it gets. There’s 3 variations you can try to connect to PIA
- Use PIA script for Ubuntu 12.04 or higher
- Setup manually via Network Manager for Ubuntu 12.04 or higher
- Setup manually via Network Manager for Ubuntu 10.10
Ubuntu 1 : Ubuntu Linux 12.04: OpenVPN Installer
- Download the openvpn ubuntu installer
- Run sudo sh ~/Downloads/install_ubuntu.sh (replace path to installer accordingly)
- Type ‘y’ to install python 2.7 in case it’s not installed.
- Type ‘y’ to install network-manager-openvpn in case it’s not installed.
- Enter the login for your account.
- Wait for the installation to finish.
- Connect using the Network Manager.
- Enter your password when prompted (only needs to be done once per region).
Ubuntu 2: Ubuntu Linux 12.04: OpenVPN via Network Manager Setup
- Open a Terminal, and run: sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome. This will prompt for both your password, and a Y/n answer, please provide it with your password, and Y
- Once installed, open System Settings, then Network
- Press the + symbol to add a new connection, and select the VPN Interface, then press Create
- Choose OpenVPN as your VPN Connection Type, and press Create
- The following will walk you though all configuration steps needed for the PIA VPN.
- Gateway: Select one of the Hostnames provided on the Network page
- Authentication
- Type: Password
- Username: The username provided with the PIA account
- Password: The password provided with the PIA account
- CA Certificate: Downloaded this zip file and extract the ca.crt file to somewhere it won’t be deleted. We suggest your Home folder. If you extract this to your home folder, when searching for it, please click on your username on the left side, which will take you right to the home folder, then select the ca.crt file from the options on the right.
- Advanced: Under the general tab, check the Use LZO data compression
- IPv4 Settings:
- Method: Automatic (VPN) Addresses Only
- Press Save. If you chose to have your password saved it may ask for you to verify your password to open your keyring.
Ubuntu 3: Ubuntu Linux 10.10: OpenVPN Setup
- In Terminal, install openvpn packages with sudo apt-get install network-manager-openvpn.
- Restart the network manager with sudo restart network-manager
- Run sudo wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
- Extract the files from the zip with unzip openvpn.zip.
- Move ca.crt and crl.pem to /etc/openvpn
- Open the Network Manager on the menu bar.
- Choose add and select the OpenVPN connection type, and click Create.
- Enter Private Internet Access SSL for the Connection Name.
- Enter us-california.privateinternetaccess.com [*] for the Gateway
- Select Password and enter your login credentials.
- Browse and select the CA Certificat we saved in Step 3.
- Choose Advanced and enable LZO Compression.
- Apply and exit.
- Connect using the Network Manager.
Testing: Leak Test Sites
Once connected, you would like to head the following websites to confirm if you are leaking any informations
- For DNS Leak test, check here:
http://dnsleak.com/ - For Email leak test, check here:
http://emailipleak.com/ - Those who uses ipv6, check your leaks here:
http://ipv6leak.com/
Conclusion
VPN is good, VPN is secure, VPN allows you to bypass proxies, Firewall, monitoring and content filtering. But there’s always that drama when you’re using VPN, it sometime is slow and sometime is not that secure you’d think. But for countries like Iran, Pakistan, Egypt, China, North Korea etc. where content filtering is done in National Level maybe it’s a way to get the voice out. I am not going to discuss legality here, so I will leave that to you.
Did I make any mistakes? Let me know. You can also tell me about your setup in comments section and I will be happy to include them in this guide or a new one.
Enjoy your PrivateInternetAccess VPN. Thanks again for reading my lengthy posts! Please share and RT.
I am from Pakistan :) I done all steps but when I connect to VPN it always shows message failed to connect to VPN and I try different Gateways like Canada, UK and US but failed to connect :(
Did you try to connect from Ubuntu? Unless your ISP is blocking VPN actively, there’s little reason why this should not work in Kali/Ubuntu/Debian/Linux Mint. You could also setup an Ubuntu VM within Kali and then VPN from there.
I am trying from Kali Linux. May be ISP is blocking but it is easier on windows to use Cyber Ghost type software for VPN.
Ubuntu VM why?
waiting for solution ;)
i have installed tor is that enough or i should install VPN too ?
can i use both of them ?
Yes, VPN then TOR would work. But expect slow (pre dialup!) traffic.
What is better to use for anonymity? VPN or TOR?
Do I need a paid subscription to OpenVPN for this to work?
How do I know my PIA name and PIA password? (PIA – Private internet access)
I followed the directions but get this message. I was unsure of what to use for a PIA name, I used my Linux User Name and just made up a password. I am guessing this is not correct. I found nothing in the OpenVPN files to tell me a name or password.
VPN connection failed.
The VPN connection “PrivateInternetAccess VPN” failed because of invalid VPN secrets.
I figured it out at the openVPN website. You have to buy a license for $9.60. That doesn’t sound bad, but you have to buy a minimum of 10. That is $96.00 when you only need one license. How much privacy do you need and what is it worth to you.
Sorry, the is $96.00 a year
jymmn, you’re confusing openVPN application and VPN service.
In this article you describe the setup of VPN on Linux. While surfing on internet i found another article on the topic of How to setup VPN on MAC at VpnRanks. I want to know your point of view about this article. Thanks in advance.
I’ve followed your guide, yet am unable to connect to the PIA VPN. I click on the Network Manager select the VPN and nothing happens. In System Settings under Network, the VPN is set to “off” and when but won’t stay switched to “on”. Is there a way to force the connection to stay on or use the VPN? It works on windows but doesn’t work on Kali, on either my HD install or in a VM on windows. 40 a year isn’t a bad deal but when it only works on one OS install and nothing else is a bit frustrating. Any ideas?
Did you follow the guide on How to fix VPN grated out issue?
Yes, as I stated I followed the guide above, as well as the greyed out VPN issue. I found this information and it corrected the problem. https://forums.kali.org/showthread.php?18597-OpenVPN-connection-won-t-start-through-Network-Manager
The response by Elfer did the trick.
Has anyone been able to use port 443 (host) for outbound connections? Everytime I force the host port within the kali network manager (Advanced tab: custom gateway port) my pia fails to connect. Any suggestions? thanks.
What is the gateway of openvpn for India
One important thing you didn’t cover in this post is does the VPN provider offer a client that locks internet access so that if the connection is lost with the VPN server, you’re not exposed.
That mostly applies to Windows client as far I managed to test.
thank you for your tutorials – I’ve used them extensively and have found them to be very complete and a great help! I used this and got my PIA set up in minutes. Thanks again!
No candidate version found for network-manager-openvpn-gnome
No candidate version found for network-manager-pptp
No candidate version found for network-manager-pptp-gnome
No candidate version found for network-manager-strongswan
No candidate version found for network-manager-vpnc
No candidate version found for network-manager-vpnc-gnome
No candidate version found for network-manager-openvpn-gnome
No candidate version found for network-manager-pptp
No candidate version found for network-manager-pptp-gnome
No candidate version found for network-manager-strongswan
No candidate version found for network-manager-vpnc
No candidate version found for network-manager-vpnc-gnome
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
All i get is this message when I try to install
is your kali repository ok? check /etc/apt/source.list and if the source list does not contain the kali repository then add the repositories first. u can jst google kali repository and u’ll get the help from kali official website. there are also post for adding kali repository on both 1.x kali as well as kali 2.0 in this site too..
thank you a million times
crap….spoke to soon. Isn’t my ip address supposed to be obsecured now? Cause it’s not. FML
gm….got it ;) Thanks for awesome tut
IDK what i did wrong but now my network interface is no more available :3
http://prntscr.com/7wlbv9
Can someone help me :3
Everything was perfect i did managed to configure pia vpn but when i was trying to connect to the vpn nothing was happening so i tried
https://forums.kali.org/showthread.php?18597-OpenVPN-connection-won-t-start-through-Network-Manager
elfer’s method at that time i was able to see the network interface but after i reboot it;s been gone :3
BlackMore, I can’t get these intructions to work with Kali2.0 – would you mind looking into this.
I get the following error when following the PIA VPN guide (https://www.privateinternetaccess.com/pages/client-support/ubuntu-openvpn):
Package network-manager-openvpn is required for installation. Aborting..
And I get this error when following your guide:
apt-get install network-manager-openvpn
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package network-manager-openvpn is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘network-manager-openvpn’ has no installation candidate
Thanks for the help
I am from Pakistan I install openvpn in kali linux 2.0 and it is not connecting
Maybe iVPN could also be great for Kali Linux. https://www.ivpn.net/why-ivpn
strongswan package seem to be disappeared any new commands??????????
how do i configure vpn on kali linux 2.0
Exactly same way.
No, not at all. You need a .ovpn file to configure it. Nobody has baeen able to setup PIA in Kali 2
Yes i haven’t been able to set up a PIA VPN connection in kali 2 either despite a few hours effort.
in Kali 2.0 i can’t get a VPN tab in network settings. so no the same as earlier kali versions.
You can get a VPN tab by pressing the little + sign in the bottom left corner in the network settings then click “OpenVPN” I have gotten it setup but I can’t get it to connect is all.
the link (https://www.privateinternetaccess.com/openvpn/openvpn.zip) is censored in my contry…how can I do?
Hi kakamay,
Then you need to find one that’s not censored and use that to get account/installer for a better paid one. Use this Free VPN providers of 2015. Good luck.
-BMO
I have tried with vpnbook, “internetz.me”, tor browser, but it don’t work.
Hi kakamay, this is loeken from internetz.me. If your country is censored try contacting our staff via livechat or by email ( support@internetz.me ). There are different kinds of blocks in different countries. We have some methods to bypass blocks for certain countries.
Thank you blackmoreops. You have made my Kali boot into the command line instead of the gui. I would enjoy some help
hey guys!
i run kali linux on virtual box on windows 7 and i use cyberghost 5 as a vpn on windows, can this make me anonymous while i use tools on kali?
Getting
Gnutls:Error in the pull function.
Unable to establish SSL connection.
What shud I do knw???
When i enter this command:
aptitude -r install network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-strongswan network-manager-vpnc network-manager-vpnc-gnome
This is what i get:
No candidate version found for network-manager-openvpn-gnome
No candidate version found for network-manager-pptp
No candidate version found for network-manager-pptp-gnome
Couldn’t find any package whose name or description matched “network-manager-strongswan”
No candidate version found for network-manager-vpnc
No candidate version found for network-manager-vpnc-gnome
No candidate version found for network-manager-openvpn-gnome
No candidate version found for network-manager-pptp
No candidate version found for network-manager-pptp-gnome
Couldn’t find any package whose name or description matched “network-manager-strongswan”
No candidate version found for network-manager-vpnc
No candidate version found for network-manager-vpnc-gnome
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Thanks, VPN works well to in kali rolling.
http://www.ironbugs.com/2016/02/anonymity-setup-vpn-service-in-kali.html
hi i don’t know how setup the password and user name ?? help please :)
Hey, maybe thats a stupid question, but i cant find how to connect in auto way to my vpn?
I used Kali 2.0, i wrote few vpn configuration in my gnome network manager but i dont have a cross or case to check to select one for autostart.
Its a little bit annoying, for exemple, i dont see if one VPN server fall down, ive nothing to say me “HEY im down, your not secure anymore”.
Just have to watch on the right up corner to check if im still safe. Nice, when you’re working to check all the time.
If you have any advice, thanks again for your work.
DpL
Appreciate this article and aiming for a similar setup. How would you suggest ensuring that the VPN is used by default with Ubuntu/Kali VMs, and that network access is denied without a PIA path up and running via VPN? tia
I’ve just added this solution to https://askubuntu.com/questions/43465/how-to-automatically-connect-to-vpn-with-network-manager?answertab=active#tab-top and it works great. I’m running kali 2016.2.8 Rolling Distro
Here’s the correct link: http://askubuntu.com/a/801519/570982
I downloaded openvpn files from the above link but when i ran them from the terminal by using command “openvpn –config …” it is asking for username and password.
Good article. Installing network manager, using Kali 3.20.2
apt-get install network-manager-openvpn-gnome
works.
when i enter this command :
aptitude -r install network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-strongswan network-manager-vpnc network-manager-vpnc-gnome
error is coming :
bash: aptitude: command not found
what is the reason behind this error ?please help!!
It sounds like you don’t have aptitude installed…try:
sudo apt-get install aptitude
This should fix the error for most but if your OS is not up to date try running:
sudo apt-get update
sudo apt-get upgrade
And then running the “sudo apt-get install aptitude” again. After aptitude is installed you should have no problem running the command in your initial comment.
root@kali:/home/jeff# aptitude -r install network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-strongswan network-manager-vpnc network-manager-vpnc-gnome
bash: aptitude: command not found
unable to download
sudo apt-get install aptitude
I wonder why nobody want to talk about “what is the username and password for this openvpn” here.. even the article above or the comments also.. nobody answer the question about what is the username and password.. So what is thePIA username and PIA password?Any web site to register account??
Thanks blackmoreops.
BTW if someone is only looking for accessing region restricted services and not doing some heavy things, you can use vpnbook instead of PIA. vpnbook is free and serves the purpose.
Great article. I’m dealing with some of these issues as well..
Great tutorial indeed. Still, if you want a vpn service that is plug and play, get Astrill.
Idd great tutorial.
I gonna give it a try very soon.
On the usb 3.0 stick with Kali 2.0 I have running Tor also an recently I have installed the Opera browser, it has a VPN and it’s running very fast.
tor + vpn is good for more anonymity
fuck… Just download vpnbook and use it… username, password given on download page.
#SM
Thanks for the entire information regarding how to setup VPN on Kali Linux and Ubuntu. This is really helpful!
my only question is where do i get the pia id pass?.. -.- asking bcoz tired of searching