Networking

Use Hamachi VPN on your Linux clients

If you need to set up a VPN on your Linux machine, and you don't want to deal with the hassle of configuring OpenVPN (or passing traffic through a router), there is a solution. Jack Wallen has the details in this tip.

If you've used Linux in a business environment, you know there are times when you might need to host a VPN on that Linux machine in order to access said machine from other locations. If you need such a service, you could go through the steps of installing a tool like OpenVPN (which is, of course, an outstanding open source VPN solution) or, you can do this the easy way and install the Hamachi VPN GUI for a very easy VPN setup.

I want to demonstrate how to install Hamachi and Haguichi on a Ubuntu desktop installation so you can see how easy it can be to add your Linux desktop to a VPN.

What you need

There are two pieces to this puzzle:

There are a few different GUI options that you may come across for Linux: Hamachi GUI and Haguichi. Hamachi GUI seems to be outdated and not terribly reliable. Haguichi, on the other hand, is quite reliable. We'll install that tool to use as a GUI front-end, but before you install that, you must install Hamachi2.

Installation

First, download the Hamachi2 deb from the Logmein download page. Once you have that downloaded, do the following:

  1. Open up a terminal window.
  2. Change to the directory housing the newly downloaded .deb file.
  3. Issue the command sudo dpkg -i logmein-hamachi_XXX_xxx.deb (Where XXX is the release number and xxx is the architecture for your hardware). NOTE: If your installation doesn't complete, you might need to open up Synaptic to "fix" the broken packages. This is an easy way to catch all of the dependencies.
  4. Type your sudo password and hit Enter.
  5. Allow the installation to complete.

With that piece installed, you are ready to install the GUI. Instead of downloading a .deb file, we are going to add the PPA for Haguichi to our system. Once the PPA is added, Haguichi can be installed using apt-get. Here are the steps:

  1. Open up a terminal.
  2. Issue the command sudo add-apt-repository ppa:webupd8team/haguichi.
  3. Issue the command sudo apt-get update.
  4. Issue the command sudo apt-get install haguichi.

I will say the Haguichi client does seem to be a bit more reliable than Hamachi GUI.

Connect to, or create a VPN network

Figure 1

Now that you have everything installed, click Applications | Internet | Haguichi. When the Haguichi window opens (at left), click Client | Join Network. A new window will open where you can enter the credentials for the VPN you want to join. You can also create a new network by clicking Client | Create Network. You will have to enter a name and a password for that network. This should go without saying, but make sure your password follows standard strong password practices. Do NOT create a week password for a VPN network connection.

Once you are joined to a VPN network you can browse other machines on the network by double-clicking the listed machine, which will open up a file browser window for all available shares on that machine. NOTE: If the target machine has no shares, you will not be able to browse the machine.

You can also change the nickname of the machine you are working on. This is handy when the hostnames of the various machines on your network are similar. To change the nickname click Client | Change Nickname and then enter the new information.

Final thoughts

If you need to connect a Linux machine to an Hamachi VPN (or need to quickly create a VPN network) you can't go wrong with Hamachi2 and either Hamachi GUI or Haguichi. The setup time is fast, the tools are user-friendly, and it beats having to walk through the more complex configuration of OpenVPN. The downside? Although the source code of the Haugichi software is 100% open source, it does rely on the Hamachi service which uses non-open source software. That's picking at nits, but some open source users are purists.

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

Editor's Picks