How to create a VPN using Hamachi for Linux

This tutorial will cover installing, configuring, and using Hamachi as your VPN software.

I will cover things such as "How do I install Hamachi?", "How do I create a VPN connection using Hamachi?", "How do I connect to a Hamachi network?", and "How do I setup a FTP server using Hamachi?".

I have broken them up into multiple parts for the purpose of simplifying the guide based on where someone starts.

Hamachi is a really great VPN software due to it's simplicity compared to others.  And even better, it's free for personal use.  You can have up to 15 people connect to you with the personal version or you can pay a small monthly fee for the commercial license and have as many connections as you like.  (It's only $4.95/month and get's cheaper when you pay for 6 months or more.)  Hamachi can also be used for creating private online gaming sessions.  Hamachi creates a private and secure encrypted network similar to a LAN but over the internet.

 

1.)  HOW TO INSTALL HAMACHI

First, visit http://www.logmein.com and download it.  You will find it in their "products" section. 
I am using Hamachi version 0.9.9.9-20 for this tutorial.

Extract the archive by right-clicking on the archive and selecting "Extract Here".  I am assuming you are working on your desktop in the following.

Now open Terminal and type the following commands.

sudo -s
cd Desktop/hamachi-0.9.9.9-20-lnx
make install
hamachi-init
tuncfg
hamachi start
hamachi login

You now have Hamachi installed and running at this point.  Each time you reboot, you will need to use the following commands to turn Hamachi on:

sudo -s
tuncfg
hamachi start

 

2.) CREATE A NEW VPN NETWORK WITH HAMACHI

This is how you create a new network for others to join on.

hamachi create networkname

Of course, replace "networkname" with the name you would like to use.
You will be prompted for a password, which is the password you wish to set for the new network.

If you get the message "Creating networkname . . failed, network name is already taken", then you need to choose another name because the one you are trying to use is already taken. 
The network name must be unique.

If you are finished with the network name, you can delete it by typing:

hamachi delete networkname

For people to connect to you, they simply join the network using the name you've created and the password you set.

If you're wanting to connect to the Hamachi network from a computer using Linux, you use this command:

hamachi join networkname

 

3.) USE HAMACHI TO CREATE A SECURE FTP SERVER WITH PROFTPD

If you're wanting to create a private and secure FTP server with ProFTPD and Hamachi, here's how to do so.  This assumes you've already installed ProFTPD and Hamachi.  If you haven't installed ProFTPD, see this tutorial on how to do so.

First you need to create a new network with Hamachi if you haven't already done so.  Read the above step 2 to see how to do that.

Now find your Hamachi IP address.  You can do this by using this command in your terminal window:

ifconfig

Look for something like ham0 as shown below.  The highlighted area is the Hamachi IP.

ubuntu_2009-02-15_08-49-51

Next you need to open your ProFTPD configuration file.  It should be located in /etc/proftpd/proftpd.conf.
You need to open it with root permissions if you haven't changed the ownership yet.  The easiest way would be to use this command:

sudo gedit /etc/proftpd/proftpd.conf

Now you need to add these two directives to it.  Enter however many IP addresses you wish to allow access from, separated by a space.  I've added both the local IP address and the Hamachi IP address as an example of adding multiple IP's, but you do not have to do this if you don't want to.

DefaultAddress 127.0.0.1 5.168.154.80
SocketBindTight on

This allows both access from the local computer and the Hamachi IP.  It will only listen for connections on these two IP's or whichever IP's you define here.
Now save the file and close it.

Now people should be able to connect to you via only your Hamachi IP.  Just have them join your Hamachi network and then enter your Hamachi IP as the "Host" and then their username and password.

 

That should be it!  If you have any other questions or think I should add more to this tutorial, please visit the forums and post there.

GUI NOTES (GHAMACHI)

There's a third-party GUI for Hamachi for Linux, meaning Hamachi didn't make it and doesn't support it.  It's called GHamachi and there's a link to it in the Hamachi download area.  However, I could not get it to work on Ubuntu 8.10 and haven't tried it on any other versions.

It launches and then quits immediately and I haven't found a solution for it yet.  So if you find the answer, please post it in the forums and I will update this tutorial to include it.

Hamachi is simple enough that I don't find it a huge ordeal, but it would be nice.

 



Comments
Add New Search RSS
Leave feedback
Name:
Your email:
 
Website:
Message Title:
Formatting:
[b] [i] [u] [url] [quote] [code] [img] 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Enter the text as you see it in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

Last Updated (Sunday, 15 February 2009 09:20)

 

!!REMEMBER: Support Forums!!

I still keep getting requests for support in the comments of posts and unfortunately I cannot give adequate responses due to the fact there's limited space and it just isn't the right place for support.
I therefore am encouraging visitors to PLEASE go to http://forum.myownserver.info for any support related questions. You will NOT receive any spam or anything you don't specifically subscribe to! I'm very meticulous about this myself and if at any time you need help stopping notifications from posts you previously subscribed to, contact me and I will promptly fix the issue.

Thank you for your participation in this!

Open SourceApache HTTP Server ProjectMySQLPHP
Twitter Feed
Make a Donation
This site does not run ads nor does anyone fund it. The owner and author is unemployed and pays for it himself, so if you're feeling generous, please make a donation of any amount to help out. Thank you very much.

Powered by easy paypal donation

Survey
Which is better?
 
Search
User Login



Visitors


Countries

30.2%United States United States
8.5%United Kingdom United Kingdom
7.7%India India
4.7%Australia Australia
4.5%Canada Canada

Visitors

Today: 25
Yesterday: 192
This Week: 25
Last Week: 1223
This Month: 894
Last Month: 4933
Total: 52612


JoomlaWatch Stats 1.2.9 by Matej Koval