Setting up OpenVPN in Ubuntu

This forum contains frequently asked questions for our services.

Setting up OpenVPN in Ubuntu

Postby admin » Fri Apr 03, 2009 11:41 am

This is an example of how you can setup the OpenVPN tunnel in Ubuntu and similar Linux distributions.
If you do not have Ubuntu, you can skip the apt-get part and install it from your current package manager or from source.
You also need to have a kernel/module that has support for TAP-devices. Ubuntu already comes with support for this.

You can get more information from on how to install it for your system.

First you need to install the OpenVPN package. You can do this by using the apt-get package manager.

Code: Select all
sudo apt-get install openvpn

Answer yes to any questions about installing all package dependencies.
Next you need to set up the configuration file in /etc/openvpn.
For example you can name it openvpn.conf, that way it will be automatically started on boot.

Here is an example of the configuration file:

Code: Select all
dev tap
port XXXX
ifconfig a.b.c.d
redirect-gateway def1
secret key.txt
cipher AES-128-CBC

Change the port number XXXX and the IP address a.b.c.d to the one you have received from PRQ.
Create a file /etc/openvpn/key.txt and paste your static key.

You can now start your tunnel with the following command:

Code: Select all
/etc/init.d/openvpn restart

You might also need to use our nameserver if your ISP does not allow your tunnel IP to use theirs.
The nameserver you need to use is when running over the tunnel.
Site Admin
Posts: 7
Joined: Mon Mar 02, 2009 10:41 pm

Return to FAQ and support

Who is online

Users browsing this forum: No registered users and 1 guest