Advertisement
Promo

Network management Toolkit in association with http://ad.doubleclick.net/clk;216302359;14453422;v?http://www.citrix.com/lang/English/lp/lp_1688615.asp

Get a quick VPN with OpenVPN

Vincent Danen

Published: 26 Jun 2006 11:00 BST

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

Virtual private networks (VPNs) are a means for connecting to a remote network and making it look like a local one. This means you can connect to your work location and have full access to resources (if so configured on the work side), such as shared printers, work files, etc.

There are a number of VPN products freely available; some are kernel-level like openswan and can be fairly difficult to configure. OpenVPN, available at http://openvpn.net/, doesn't require patching the kernel and can be extremely straightforward. Configuration is more difficult if you want to use a lot of its features, but for a quick client/server VPN, you can be up and running in minutes.

The first step is to install OpenVPN; this can be done either by compiling from source or installing a package from your vendor (i.e., Mandriva, Debian, and others provide OpenVPN packages that are an urpmi or apt-get away).

Once you've installed OpenVPN on the two systems you want to create a VPN between, you need to determine how to configure them to connect to each other. The simplest method is to use a static, pre-shared key. This has certain drawbacks, such as the lack of multiple clients to a server, but for a straight client/server scenario it works very well. It's also the easiest setup.

To generate the key, execute:

# openvpn --genkey --secret static.key

This file needs to be on both the client and server, so copy it via ssh or through some other secure method like a floppy or CD.

On the server, put static.key into a directory special to OpenVPN, such as /etc/openvpn/. In this same directory, create a server.conf file. The /etc/openvpn/server.conf file would look like:

dev tun

ifconfig 10.10.10.1 10.10.10.2

secret static.key

You can use any unused subnet you like instead of the 10.10.10.0 shown above.

On the client, move static.key into /etc/openvpn as well and create /etc/openvpn/client.conf with the following:

remote vpn.domain.com

dev tun

ifconfig 10.10.10.2 10.10.10.1

secret static.key

Replace vpn.domain.com with the hostname or IP address of the server. Also, ensure that UDP port 1194 is allowed to receive traffic in your firewall rules for both locations.

On the server, start openvpn using:

# openvpn --config /etc/openvpn/server.conf

And do the same on the client. You now should be able to ping both machines from each other. If you're unable to ping, likely one of the systems isn't properly allowing UDP port 1194 traffic. You should also be able to connect to any services that would be permissible on the local LAN.

OpenVPN can be either easy or challenging to configure. One of its greatest strengths is that it doesn't require complicated patching and compiling of the kernel, is cross-platform (there are versions for Windows, OS X, and other operating systems) and can make for a quick and painless way to connect one remote machine to another.

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

Did you find this article useful?
103 out of 262 people found this useful



Company/Topic Alerts

Create a new alert from the list below:




Related Citrix Resources

Achieving the lowest server virtualisation TCO

Consolidation through server virtualization is a powerful agent for datacenter change, but...

Achieving the lowest server virtualisation Total Cost of Ownership

Consolidation through server virtualization is a powerful agent for datacenter change, but...

Citrix XenDesktop: The Best Desktop Delivery System For Today's Demanding Business Needs

Whether you're considering your first virtual desktop solution or trying to salvage an existing...

Desktop Virtualisation: A buyer's checklist

Desktop virtualization should do more than just move desktop management to the datacenter—its real...

Five reasons why you need Citrix Essentials for Hyper-V now

This paper explores common challenges associated with server virtualization deployments and the...

Accelerate Business through a Cost-efficient Virtual Workforce

This white paper defines a virtual workforce, describes the challenges and requirements that...

See All White Papers

Video icon

Video

On The Road Blog

Logitech Bluetooth Mouse M555b

Last week I wrote about The RIght Mouse for the Job, and mentioned that Logitech had a new Bluetooth mouse which was not yet available in Switzerland. Sure enough, a couple of days... More

Post a comment

Ubuntu Netbook Remix "Acid Test" - Wra...

Time to wrap up one more open item - my informal "Acid Test" of UNR. The size of my test group has doubled (from one to two), and the results have been consistent. The conclusion... More

Post a comment

Sony goes in-between with the W-Series...

Last December, UK Vaio chief Nicolas Barendson told ZDNet UK that Sony wouldn't do netbooks in their current form factor, because such devices were in-between products that were neither... More

1 comment


Skip Sub Navigation Links to CNET Brand Links

Help

Become part of the ZDNet community.

Newsletters