Advertisement
Promo

Network management Toolkit in association with http://ad.doubleclick.net/clk;217618582;14453422;e?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 friendlyPrint with EPSON

Did you find this article useful?
106 out of 265 people found this useful


Company/Topic Alerts

Create a new alert from the list below:




Related Citrix Resources

Achieving the lowest server virtualization TCO

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

Achieving the lowest server virtualization 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 Virtualization: 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...

See All White Papers

Video icon

Video

On The Road Blog

Nokia halves smartphone portfolio

Nokia has reduced the number of smartphone models it intends to introduce in 2010 by half, according to reports. Quoted in an article on Reuters, the Finnish handset maker's new... More

1 comment

Can I have fries with that? (Consumer...

Licence policies of Tech company's have been for a long time both complicated and 'Dick Turpin-esque', people just click 'I agree' without reading the Agreement. I do the same, but... More

1 comment

Lenovo repurchases mobile phone arm

Lenovo has bought back the mobile phone arm that it sold to a private equity firm at the start of 2008, the company said on Friday. The manufacturer sold Lenovo Mobile to the Hony... More

Post a comment


Skip Sub Navigation Links to CNET Brand Links

Help

Become part of the ZDNet community.

Newsletters