Friday, February 5, 2010

Create your own virtual private network with Hamachi

You can do things between computers on your local network you can't from out on the internet: like listen to a shared iTunes library or access files in shared folders. But using the free virtual private network applicationHamachi, you can access your computer from anywhere on the internet as if you were home on your local network.

Today we'll use Hamachi to create a virtual private network between a PC and Mac and listen to a shared iTunes library over the internet.

What's Hamachi VPN?

The free Hamachi desktop application gives you secure, zero-configuration LAN over the internet. Any app that works over a local network can be used with Hamachi over the internet, like Windows file sharing, iTunes, Remote Desktop, FTP, VNC and gaming. All of Hamachi's connections are secure, encrypted, authenticated and peer-to-peer. Though Hamachi acts as a mediator between your computers and creates the tunnel for their communication, Hamachi's servers don't listen in on or log your activity.

Some situations you might use Hamachi:

  • You're on the road with your laptop and want secure access to your PC's files.
  • Your office or dorm room computer is behind a restrictive firewall that doesn't let you reach it from the internet.
  • You want to add encryption to insecure network protocols like VNC.
  • You want to set up a shared folder of files for friends and family to access.

Sound useful? Let's get started.

Set up Hamachi

  1. Download and install Hamachi. For the most part, the Windows installation is the usual "just click next" routine, except for two notes: Hamachi will attempt to install a virtual network adapter which Windows XP says is not supported. - just hit the "Continue Anyway" button at that point. Also, if you have Windows Firewall enabled (or any firewall, for that matter), it will ask if you want to allow traffic to and from the Hamachi client. You do. Click the "Unblock" button to allow Hamachi traffic through your firewall, as shown.

  2. Create your Hamachi network. Once Hamachi's installed it will walk you through a quick tutorial to get you started. Read it - it's worth it. Then, hit the network button (bottom right hand corner, second button to the left) and choose "Create new network" from the menu. Give your network a name (mine was "gtrap-home") and a password (if you'd like.) Click the Create button.

    Now your computer will be a member of the new network, and get its own Hamachi IP address (in addition to its regular IP address). It will also have a nickname that will identify it on your network. Mine was "dell-pc."
  3. Join your Hamachi network. At this point you can tell your friends or co-workers your Hamachi network's name and password so they too can join it with the Hamachi client installed. To connect my Mac to my new network, I issued a hamachi join gtrap-home command after setting my nickname to "powerbook." Once my Mac was on the network, the Hamachi client looked like this.
  4. Network away! Now you're ready to share files or stream your iTunes library to other computers in your Hamachi virtual home network. Within iTunes on my PC I turned sharing on and tried to listen on my Mac. At first the sharing didn't work because Windows Firewall wasn't allowing it. Once I opened up port 3689 (iTunes sharing port) within Windows Firewall, I was all set. Go to Windows Firewall settings in Control panel and open up the iTunes port as shown (click to enlarge):

    Then, I could see and play tunes in my PC's shared library within iTunes on my Mac. (Be sure to check off "Look for shared libraries" in iTunes' Preferences Sharing panel.)

Finally, you can manage your Hamachi networks and clients through a web interface as well. Register for a free account at My Hamachi and enter your client's Hamachi IP. Once you grant the web site access to your network information, view all your networks and clients on the web site, like this (click to enlarge):

Streaming music (and, uh, copying songs from others' shared iTunes libraries) is only one example of what can be done with your virtual home network. Browse shared Windows folders, remote control your PC, access an FTP or web server (over Hamachi's encrypted connection). Anything you can do locally you can do over the 'net with Hamachi.

No comments:

Post a Comment