Virtual Private Networks (VPNs) are great to help you keep your Internet traffic secure. VPN’s do two things. First they encrypt your data so no one can tell what you are looking at. Second, VPN’s also encrypt the location of the data that you are requesting. This keeps groups from blocking access to public websites or modifying the content of the websites you are looking at. I recently purchased a VPN service from the “Private Internet Access” company for approximately $40 / year. I followed this guide install the VPN on my computer via this guide. For some reason it didn’t quite work. Perhaps because the guide was for Ubuntu 12.04 and currently I am running Linux Mint 17.2 (which runs off the same source list as Ubuntu 14.04). Here is the guide to how I installed the VPN’s.
I first followed the tutorial by getting the script that Private Internet Access has on their website and running the script:
chmod +x install_ubuntu.sh
This script successfully added the VPN connections under the VPN connections tab. However when I went to click on them I got an error.
The error said “The VPN connection failed because there where no valid VPN secrets.” I did some Googling and finally found a way to fix the issues. The script we ran earlier created a bunch of files in the /etc/NetworkManager/system-connections/ folder. We need to edit these files to change
and add the following lines
There are a bunch of “PIA – Location” flies in the /etc/NetworkManager/system-connections/ folder so rather than edit each one by hand I wrote a quick script to edit them. You can use the following script
Create a file with the contents of the script below
for f in /etc/NetworkManager/system-connections/PIA*;
sed -i 's/password-flags=1/password-flags=0/g' "$f"
" >> "$f"
Then make it executable with the chmod +x and run the script with a sudo.
And there we go you should be able to access your VPN.