VPN (Virtual Private Network)

From PCLinuxOSHelp Knowledge Base
Jump to: navigation, search
  • Relevant to All editions of PCLinuxOS.


Setting Up VPN using VPNBook

This example uses the free provider VPNBook but the same principles apply generally to other provider.


1. Install openvpn from the Synaptic Package Manager.

2. Open your browser and go to http://www.vpnbook.com/freevpn.

3. Download one of their certificate bundles. The different bundles are for servers in different countries.

4. Make a note of the Username and Password on the download page

5. Extract the zip file and locate the .ovpn configuration files. For web browsing you will generally use the tcp80.ovpn or tcp443.ovpn file.

To set things up you can either use the net_applet on the task bar or manually run the opennvpn command in a terminal.

Using the openvpn command

Open a terminal and su to root. Then issue the following command to start the VPN using your chosen .ovpn file from Step 5 above.

openvpn --config vpnbook-us1-tcp80.ovpn

You will be prompted for the Username and Password which you noted in Step 4 above. The password is changed regularly so will need to revisit the site from time to time to get the latest password.

You may need to restart your web browser to continue browsing. To close the VPN and return to your normal network press Ctrl+C in the terminal window running the openvpn command. Please note that you will need to close and start your web browser again after stopping vpnbook.

For those who wish to start the VPN without any manual input of the username and password, create a file with two entries, one per line. The first line gets the user name and the second line gets the password. Put nothing else in the file. Call the file login.

Then use the following command to launch the VPNBook service (as root of course), and providing the correct <path to> that points to the appropriate files.

  openvpn --config/<path to>/vpnbook-euro2-tcp80.ovpn --auth-user-pass/<path to>/login

That should make it easy to incorporate in a permanent start up, if required. However, you will need to go to the VPNBook website periodically to obtain the updated username and password, and then update the login file when they change.

Using net_applet

Right Click on the net_applet icon and select VPN Connection->Manage VPN connections.

VPN2.png

Select OpenVPN and click NEXT

VPN3a.png

Enter a name for VPN connection and then click the Open button for the Import file

VPN3.png

Navigate to your chosen configuration file and click OK. This will take you back to the configuration screen then Click NEXT

VPN5.png

Don't change anything on this screen unless you know what you are doing. Click NEXT

VPN6.png

Once again don't change anything here. Click NEXT

VPN7.png

The VPN connection has now been configured. You can choose to start the connection now or wait until later. If you want to start the connection later then you Right Click on the net_applet icon and select VPN Connectionagain. Your newly configured connection will appear under the Manage VPN connections and you can click it to start the connection. If it doesn't appear then restart net_applet and try again.

When you choose to start the connection the login box will appear

VPN9.png

Enter here the Username and Password you noted in Step 4 at the start and your VPN connection should start.

When you hover your mouse over the net_applet icon it should say "Network is up on interface tunN". The reference to tun signifies that your VPN tunnel is active.

See also this article in the May 2017 edition of the PCLinuxOS Magazine