Install OpenVPN On Ubuntu Server 10.04

OpenVPN is a free and open source software application that implements virtual private network (VPN) solutions for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses SSL/TLS security for encryption and is capable of traversing network address translators (NATs) and firewalls. It was written by James Yonan and is published under the GNU General Public License (GPL).” (Cite from Linux Security).

So with OpenVPN you can create a secure private network using internet connection/Public IP. OpenVPN uses the OpenSSL library to provide encryption of both the data (client and server) and control channels and transmitted data. OpenVPN work in multi platform. So once the server is setup and configured (i suggest use Linux), the client can connect from any platform (Windows, Mac OS, And Linux).

To install OpenVPN on Linux Ubuntu 10.04:

The Server

Login as root first:

Install the OpenVPN:

Configure it:
1. Copy the easy-rsa directory to openvpn folder:

2. Edit the vars file

3. Find and edit this line:

With your information

4. Create the server certificates:

5. Create the client certificates:

Change hostname to your server hostname (with no brackets)

6. Compress certificate for client:

7. Download/copy forclient.tgz for your openvpn client (I save the forclient.tgz into my /home folder)
8. Configure /etc/openvpn/server.conf

9. Edit server.conf

And change the folowing lines, I use 192.168.10.0/24 for my private network. If you use 222.124.204.34 from your public IP Address, then add it became:

And save then.

After that, start the OpenVPN server with the following command:

And the following command for restart the VPN:

The Client
On the Client, you must have OpenVPN first, install it:

Then configure it:

Add the following lines:

Save it.

Get the forclient.tgz file from server (/home/forclient.tgz) and extract it into /etc/openvpn

Test connection from client to server by typing:

And ping from client to server through Private IP:

If you get reply from server, it means your configuration was successful 🙂 and if Request Timed Out, check back the script

Good luck! 🙂

Content Protection by DMCA.com