LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   [Tip] Using ProXPN via OpenVPN with Fedora (http://www.linuxquestions.org/questions/linux-general-1/%5Btip%5D-using-proxpn-via-openvpn-with-fedora-4175471389/)

dereism 07-29-2013 08:22 PM

[Tip] Using ProXPN via OpenVPN with Fedora
 
How to use the ProXPN VPN service under Fedora with OpenVPN. (Created with Fedora 19.) All commands executed as root.

I feel it necessary to break this into two parts: The 'Keys Part' and the 'Config Part'.

First, the initial step and the...

Keys Part:

Create a directory for the OpenVPN keys (if it doesn't exist):

Code:

mkdir /etc/openvpn/keys
Download and extract the ProXPN Mac source. We are only interested in the 'config' directory contained within.

Code:

cd /tmp && wget https://www.proxpn.com/proxpn_mac_source.tar.gz
Code:

tar -xvf proxpn_mac_source.tar.gz
Into that ProXPN MacOSX/config...

Code:

cd /tmp/MacOSX/config/ssl
Now we'll copy the certs and key to the OpenVPN keys directory we created earlier, but use a custom name for the client.crt and client.key files (I used 'example' as the custom name in the following command):

Code:

cp ca.crt /etc/openvpn/keys/ca.crt && cp client.crt /etc/openvpn/keys/example.crt && cp client.key /etc/openvpn/keys/example.key
The key and certs are now firmly planted, and we'll move on to working out the configuration...

Config Part:

We'll copy the sample OpenVPN client config and place it in /etc/openvpn as 'example.conf':

Code:

cp -ai /usr/share/doc/openvpn-*/sample/sample-config-files/client.conf /etc/openvpn/example.conf
Two steps here... Open the 'proxpn.ovpn' file from the Mac 'config' directory we used above (/tmp/MacOSX/config/proxpn.ovpn). Copy the contents of 'proxpn.ovpn' into the '/etc/openvpn/example.conf' file we created in the previous step, replacing all of the sample contents of 'example.conf'.

In our newly propagated 'example.conf', uncomment line 4. Also, if you are a ProXPN subscriber, you can edit this line to reflect another server in another location such as:
  • miami.proxpn.com – Miami (the only option for free users)
  • uk.proxpn.com - UK
  • seattle.proxpn.com – Seattle
  • nl.proxpn.com – Netherlands
  • sg.proxpn.com - Singapore
  • or New York (considered the fastest): 173.231.141.114

(There are others, I believe, though this is enough for me.)

Edit lines 11, 12, and 13 of 'example.conf' to reflect the new path to your certs and key. In this example:

ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/example.crt
key /etc/openvpn/keys/example.key

One more thing: Line 21 of example.conf reads 'auth-user-pass'... Change it to 'auth-user-pass passwd'. Save and close.

Now we create the 'passwd' file referenced in the last step.

Code:

touch /etc/openvpn/passwd
Open the created 'passwd' file and add two lines: The first line is your ProXPN username (email address), the second line is your password. Save and close.


As an aside, I have two .conf files for ProXPN, one for New York with line 4 reading
Code:

remote 173.231.141.114 443
...and one for the UK (BBC iPlayer):
Code:

remote uk.proxpn.com 443


Now we'll create a systemd service for our example OpenVPN config (note that I am still using the 'example' nomenclature, please use something else from the beginning to suit your whim):

Code:

cd /lib/systemd/system
Code:

ln openvpn@.service openvpn@example.service
To start the service and launch our ProXPN/OpenVPN session:

Code:

systemctl start openvpn@example.service
To stop it...

Code:

systemctl stop openvpn@example.service
To start this ProXPN/OpenVPN service on boot:

Code:

systemctl enable openvpn@example.service
And that's it. Please let me know where I went wrong, where improvement lies, or if it works for you or not :)


All times are GMT -5. The time now is 01:10 AM.