latimeria
Posts: 257
Joined: Sat Jan 31, 2015 1:47 pm

PIA VPN configuration

Thu Apr 07, 2016 6:39 pm

Hi all,
I'm going to buy an account for VPN service with https://www.privateinternetaccess.com/
anyone can help with config under raspbian jessie or post a good link?

many thanks

User avatar
DougieLawson
Posts: 36331
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PIA VPN configuration

Fri Apr 08, 2016 9:11 pm

Since you're paying that company for their service start at their customer support centre pages.
https://support.privateinternetaccess.com/
If they can't help, then cancel your contract.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

jameshouston135
Posts: 3
Joined: Mon Apr 11, 2016 7:51 am

Re: PIA VPN configuration

Mon Apr 11, 2016 7:58 am

Hi @ latimeria, yeah the support will be give you better idea about that how to setup PIA and further more if you are facing any issue to understand than and i know some best guide that give you better idea that how to setup vpn, however i will send you if you need.

sunilzs
Posts: 1
Joined: Sat Jun 04, 2016 2:07 am

Re: PIA VPN configuration

Sat Jun 04, 2016 2:15 am

Hi could you please direct me those intructions to setup PIA on raspberry pi? I wasted an entire day trying to setup the vpn by following various guides on the internet but nothing worked. Please help.

User avatar
DougieLawson
Posts: 36331
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PIA VPN configuration

Sat Jun 04, 2016 6:35 am

Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

laurenmartinln10
Posts: 3
Joined: Fri Aug 26, 2016 8:08 am

Re: PIA VPN configuration

Fri Aug 26, 2016 10:48 am

In this article I'll show how to configure the VPN connection, provided by private Internet access in Raspberry Pi (but the same steps are valid for any other Linux distribution).

I found this statement in a private Internet access forum and before that i have already read private Internet access review.

1. If you have not already done so, you need to install OpenVPN.
Sudo apt-get installs OpenVPN

2. Go to the directory where the OpenVPN / TEC:
cd / etc. / OpenVPN

3. Boot from private access to Internet at the zip folder. This folder contains all OpenVPN configuration files.
Wget privateinternetaccess_com / OpenVPN / openvpn.zip

4. Unzip the folder with unpacked. If you do not have to unpack already installed on your system, run the following command:
Sudo apt-get install unzip, then unpack: unpack openvpn.zip sudo

5. To view a list of servers that can be connected to run: ls -l

6. As you can see each server configuration files .ovpn extension. Now you can run the final command to connect to the server:
Sudo OpenVPN configuration-Sever-filename.ovpn

After executing the above command, you need to insert the username and password of the account that private Internet access. If you want to avoid inserting a username and password every time you want to connect to the VPN, you can perform the following actions:

1. Create a file with a .txt extension in the / etc folder / OpenVPN (the same folder on the .ovpn file). You can name this file 'pass.txt'
2. In the first two lines of the file to put the user name and password as:
Username

password

3. Save and close the file.
4. Open your .ovpn and add the following line at the bottom:
auth-user pass pass.txt

5. Save and try to connect again. You should not need to enter a user name and password at this time.
This is all.

NoBodyUKnow
Posts: 37
Joined: Wed Feb 15, 2017 3:44 am

Re: PIA VPN configuration

Thu Feb 16, 2017 4:24 pm

This seems like it would work with other vpn providers as well. For example, expresssvpn. They don't officially support RPi yet., but here is their tutorial for Linux: https://www.expressvpn.com/support/vpn- ... h-openvpn/

Anyone see any issues with this setup, from a process or security standpoint?

I started to set up openvpn on my Pi using the tut at the link below, but it seems overly complex, compared to the above: https://www.digitalocean.com/community/ ... ll-openvpn

I'm actually started on the process above, having modified my config files, establishing a static ip, started generating keys... Other than that, I really don't have anything on my Pi, which is running Jessie. Should I reformat my sd card, reload the Raspbian image and start from scratch?

Ultimately, I want to set up my Pi as an openvpn router for streaming, routing all of my network traffic through Expressvpn.

Any suggestions/input greatly appreciated!

NBUK

gtj
Posts: 13
Joined: Tue Jan 19, 2016 10:32 pm

Re: PIA VPN configuration

Tue Mar 21, 2017 10:28 pm

Hello,

I have successfully configured PIA VPN on my Pi after hours of messing around with different guides and instructions.

My only problem now is I can't get my Pi to connect to my PIA VPN automatically after every reboot. Therefore, I have to manually start the script everytime I boot my Pi :

Code: Select all

sudo openvpn my-configuration-file.ovpn
in order to connect to it.

I tried to follow this specific guide:

https://dotslashnotes.wordpress.com/201 ... omment-233

but returns an error at the this point:

Code: Select all

/etc/init.d/VPNConnection: 26: /etc/init.d/VPNConnection: stop}”: not found
Any help to make my PIA VPN starting at every reboot of my Pi will be greatly appreciated!


gtj
Posts: 13
Joined: Tue Jan 19, 2016 10:32 pm

Re: PIA VPN configuration

Tue Mar 21, 2017 11:26 pm

Yeah, it works! :P

I used this part of the article you suggested:

''After you’ve installed openvpn, you’ll need to choose a VPN provider. Ensure that the one you choose, supports Linux and Openvpn. If it’s a good provider, they will provide you with the option of downloading an OpenVPN configuration file, which should have the extension (.ovpn). After you’ve downloading the file to your Raspberry Pi, change the extension to a (.conf) extension and copy it to the “/etc/openvpn/” directory of your Raspberry Pi.


sudo cp your_vpn_provider.ovpn /etc/openvpn/your_vpn_provider.conf
1
sudo cp your_vpn_provider.ovpn /etc/openvpn/your_vpn_provider.conf
Test that the VPN actually works.


sudo openvpn --config /etc/openvpn/your_vpn_provide.conf
1
sudo openvpn --config /etc/openvpn/your_vpn_provide.conf
If it’s working as expected, then press ctrl-c to exit.

Enable VPN after reboot


sudo systemctl enable [email protected]_vpn_provider
1
sudo systemctl enable [email protected]_vpn_provider
You should get a message similar to this (see below), the “[email protected]” will of course be what you’ve called your file.


Created symlink from /etc/systemd/system/multi-
user.target.wants/[email protected]_vpn_provider.service to
/lib/systemd/system/[email protected]
1
2
3
Created symlink from /etc/systemd/system/multi-
user.target.wants/[email protected]_vpn_provider.service to
/lib/systemd/system/[email protected] ''

in conjuction with this:
https://dotslashnotes.wordpress.com/201 ... pberry-pi/

and I'm finally set!

Thanks mate. I really appreciate your help with this. Cheers! 8-)

NoBodyUKnow
Posts: 37
Joined: Wed Feb 15, 2017 3:44 am

Re: PIA VPN configuration

Wed Mar 22, 2017 1:26 am

Great to hear it's working for you. I haven't gotten that far yet. Are you running Jessie? Maybe you can help me get mine working.

gtj
Posts: 13
Joined: Tue Jan 19, 2016 10:32 pm

Re: PIA VPN configuration

Wed Mar 22, 2017 1:42 am

Yes.I'm running Jessie, the latest one.
I just combined the 2 posts - the one referrng to installing and configuring openvpn I posted above, as well as the second, that one you suggested. I used the part of starting at reboot only from your post. The key was to generate a copy of the .ovpn file with a .conf extention and that conf is that can be asked to start with every boot.

I'm now running a torrent box and samba share/nas secured with pia vpn and I'm able to start the device whenever is needed without having to leave it always on.

Please let me know if you need me to specify any of the steps I followed. I'm a noob with all this stuff but I might be able to help.

davekimble
Posts: 10
Joined: Sat Dec 15, 2012 3:20 am

Re: PIA VPN configuration

Thu Aug 09, 2018 3:25 am

Works for me on OrangePi PC with Armbian 5.38

My script for it:

How to set up OrangePi for PIA VPN (example Hong Kong server)

1. install the openvpn package:
sudo apt install openvpn

2. download the PIA server data (50 *.ovpn files + 2 certificates) :
wget privateinternetaccess_com/openvpn/openvpn.zip

3. unzip it into your /etc/openvpn/ folder :
sudo unzip openvpn.zip -d /etc/openvpn/

4. change directory to the folder:
cd /etc/openvpn

5. connect to server:
sudo openvpn "Hong Kong.ovpn"
Enter Auth Username ...
Enter Auth Password ...


6. To automate entry of credentials:
create a file /etc/openvpn/credentials.txt which contains:
<your username>\n
<your password>\n

edit the "Hong Kong.ovpn" file
change "auth-user-pass" to "auth-user-pass credentials.txt"
add the line "auth-nocache"

7. to automate connecting at start up:
add 2 lines to autostart :
cd /etc/openvpn
sudo openvpn "Hong Kong.ovpn"


Thanks to all who battle with these things.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23965
Joined: Sat Jul 30, 2011 7:41 pm

Re: PIA VPN configuration

Thu Aug 09, 2018 9:35 am

davekimble wrote:
Thu Aug 09, 2018 3:25 am
Works for me on OrangePi PC with Armbian 5.38

My script for it:

How to set up OrangePi for PIA VPN (example Hong Kong server)

1. install the openvpn package:
sudo apt install openvpn

2. download the PIA server data (50 *.ovpn files + 2 certificates) :
wget privateinternetaccess_com/openvpn/openvpn.zip

3. unzip it into your /etc/openvpn/ folder :
sudo unzip openvpn.zip -d /etc/openvpn/

4. change directory to the folder:
cd /etc/openvpn

5. connect to server:
sudo openvpn "Hong Kong.ovpn"
Enter Auth Username ...
Enter Auth Password ...


6. To automate entry of credentials:
create a file /etc/openvpn/credentials.txt which contains:
<your username>\n
<your password>\n

edit the "Hong Kong.ovpn" file
change "auth-user-pass" to "auth-user-pass credentials.txt"
add the line "auth-nocache"

7. to automate connecting at start up:
add 2 lines to autostart :
cd /etc/openvpn
sudo openvpn "Hong Kong.ovpn"


Thanks to all who battle with these things.
You are presumably aware you are posting on a year old thread, and not only that, but posting information about a different and competing device? Any particular reason for that?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

abaddon sinnerman
Posts: 2
Joined: Sat Dec 15, 2018 4:45 am

Re: PIA VPN configuration

Sat Dec 15, 2018 4:56 am

davekimble wrote:
Thu Aug 09, 2018 3:25 am
Works for me on OrangePi PC with Armbian 5.38

My script for it:

How to set up OrangePi for PIA VPN (example Hong Kong server)

1. install the openvpn package:
sudo apt install openvpn

2. download the PIA server data (50 *.ovpn files + 2 certificates) :
wget privateinternetaccess_com/openvpn/openvpn.zip

3. unzip it into your /etc/openvpn/ folder :
sudo unzip openvpn.zip -d /etc/openvpn/

4. change directory to the folder:
cd /etc/openvpn

5. connect to server:
sudo openvpn "Hong Kong.ovpn"
Enter Auth Username ...
Enter Auth Password ...


6. To automate entry of credentials:
create a file /etc/openvpn/credentials.txt which contains:
<your username>\n
<your password>\n

edit the "Hong Kong.ovpn" file
change "auth-user-pass" to "auth-user-pass credentials.txt"
add the line "auth-nocache"

7. to automate connecting at start up:
add 2 lines to autostart :
cd /etc/openvpn
sudo openvpn "Hong Kong.ovpn"


Thanks to all who battle with these things.
Thanks dude this work's well for me :mrgreen:

harryjosh
Posts: 2
Joined: Sat Mar 09, 2019 8:48 am

Re: PIA VPN configuration

Mon Sep 02, 2019 2:45 pm

I’ve been using Private Internet Access for almost a year now and have been very happy with it. It’s fast and allows manual selection of a variety of servers around the US and the rest of the world. Last year they had a sale on Black Friday, so I’d recommend waiting until Black Friday for a sale again if you don’t need to buy one right now.

Therefore, I heard about Bullet VPN https://www.bulletvpn.com/ usually people like it, so I’m also going to try it. Also, I checked ExpressVPN, and I should say, it was also good, I noted that all IP addresses weren’t blacklisted, and it is not expensive.

Return to “Raspbian”