Nurasto.com Website

My digital scrapbook

Implementing LogMeIn Hamachi on Ubuntu Server

on under Computer and Tech26 Comments

I have to manage several server in client’s local area network and those server located behind a router. I want a solution to makes those server still accessible from outside without changing any router configuration especially port forwarding. Another problem is when using OpenVPN, it will needs static IP which my client can’t afford and Dynamic IP will confuse me a lot. We could use Dynamic DNS service but it fast solution for multiple server in one Dynamic IP. So, I need VPN solution which is cheap and on demand.

Another day, still trying to find all solutions that possibly answer the problem including using TeamViewer on Ubuntu Server but never succeed because there’s no GUI on the server. Looking forward for the solution on the Google then I found something interesting. LogmeIn offering VPN service without any hassle or complicated configuration called LogMeIn Hamachi. This is what I am looking for and you may too.

Hamachi will allow LAN over the internet which can be used for e-office for managing documents, building game server, accessing remote server by SSH and many more. In this article I will show you what I had been done to establish connection between a server running Ubuntu Server 10.04 LTS 64bit and my PC at home running Ubuntu Desktop 12.04 (Precise Pangolin) 64bit.

Installation

You need a LogMeIn account. It easy traditional 3 step method; sign up, activate, and log in. After those steps you will enter LogMeIn central. They giving free non-commercial use for 5 nodes in a network.

Now you need to add a network, just create a network using unique name.  In the wizard you can choose join requests method, since I want to make my  works easier I was choose “Accept automatically”. Every node will freely join the network but I don’t want them join without any password, so I make every node who want join my hamachi network must provide a password which can be defined on network setup. Anyway, LogMeIn recommends to approve every request or add client manually via web.

After you done, LogMeIn will give your new network with unique id which to be use to connect your node to the network. You need this id to join a network using hamachi.

To be able to connect to Hamachi, you need to download Hamachi client for linux based OS. LogMeIn provide 3 flavour RPM, DEB, and compressed TGZ. They also support 32bit, 64bit, and ARM. Because both system are in 64bit and deb package also provided, I choose to download 64bit DEB package. We download the file on our home directory. Update: Please kindly check the last version of the installer from logmein site and adjust the installer download location.

wget https://secure.logmein.com/labs/logmein-hamachi_2.1.0.86-1_amd64.deb

If your system using 32bit please replace with

wget https://secure.logmein.com/labs/logmein-hamachi_2.1.0.86-1_i386.deb

Now it’s time to install the Hamachi to our system. Hamachi needs LSB 3.0 to make it work, so we need to download LSB package from ubuntu repo.

sudo apt-get install lsb

Then you will be able to install Hamachi, remember we was downloading the file on our home directory

sudo dpkg -i logmein-hamachi_2.1.0.86-1_amd64.deb

Now, Hamachi installed on our system and we can start to use it. Again, if you have 32 bit please adjust the file with the 32bit one.

Using LogMeIn Hamachi

To make Hamachi as service just type this

sudo service hamachi start

We are not yet connected to Hamachi. We need to make our system connected to Hamachi, set our pc nick and establish with a network.

sudo hamachi login
sudo hamachi set-nick firstpc
sudo hamachi join 123456

Replace firstpc to other name you want and replace 123456 with unique id you got from LogMeIn central under your network profile. At this time, you already connected to a network and a VPN IP will assigned to your PC.  If you want to check what IP is assigned to you just type

ifconfig

Every VPN IP have this ip pattern 5.x.x.x, while x is variable. If you need one more PC to make it works, just do the same steps on another PC. After second PC attached to the network you can run

sudo hamachi list

to retrieve members list on your network. Now, try to ping one PC to another.

You don’t need to make any start up configuration, LogMeIn Hamachi already remembering your configuration, so it will work automatically after reboot.

  • john

    Will this allow me to access a intranet website at my store from my home office?

    • Yes, that’s could be done. Just make sure your firewall doesn’t block hamachi ports. Here the list TCP 12975, 32976, 443. UDP 17771.

  • jawad

    Thanks for the helpful post,

    I am running Ubuntu on a VM running on ESXi. But I cannot connect to a network. It always fail connecting to the network.

    What could really be wrong here.

    I also posted the question on http://community.logmein.com/t5/Hamachi/hamachi-on-ubuntu-12-04-LTS/m-p/89924 for an answer.

    • Seems you already got the answer from them :). Since they was changing several things and Hamachi VPN IP was updated.

    • Luiz Felipe B. Gomes

      check if you are trying to connect with the id of NETWORK, and not with id of your personal PC

  • Really helpful ! thank you!

  • Pingback: Ubuntu Server 12.04 LTS 安装 Hamachi | OxOo社 - Blog()

  • Simpleblogger.de

    Good description, thanks!

  • Adrian

    Just amazing! excellent! TY

  • Soundblastdj

    Could I have some help? I am installing from a usb stick because I can’t get the website url to work for downloading. I got the image on the stick, the .deb one, and I can’t figure out how to move it to the home directory.

    • bojack

      open a terminal and write

      lsblk

      This will show the external devices conected to the computer, you should find your usb, with the name ‘sdb’, ‘sda’, or ‘sdc’ (you can identify it depending on the size of your USB)

      once you identify your USB Drive

      write

      sudo cp /dev/sdb/logmein-hamachi_2.1.0.86-1_amd64.deb /home/”username”(replacing sdb with YOUR USB location and “username” with your username and obviosly the hamachi .deb name to your downloaded one) this will copy the .deb file to your home folder.

      Hope this helps 🙂

  • Hans Kristian Larsen

    Hello
    I’m running Ubuntu Server 12.04 and have successfully added the client, however I can not make it run as a service, when I do

    • Luiz Felipe B. Gomes

      i had this problem too… try to init the service with: sudo /etc/init.d/logmein-hamachi start ….. it worked for me

  • Hans Kristian Larsen

    Something went wrong in previous post, to finnish it:
    when I do sudo service hamachi start I get
    user@server:~$ sudo service hamachi start
    hamachi: unrecognized service
    any idea?
    br
    hkl

    • Hamachi maybe not installed yet on your system. You should check it again.

      sudo dpkg -l | grep hamachi

      It’s L in lower case. It should echo “logmein-hamachi” but if you didn’t get any result, probably no installed yet. You should levitate as root to install hamachi.

      sudo dpkg -i logmein-hamachi_2.1.0.86-1_amd64.deb

      for example, change the deb package according.

    • Luiz Felipe B. Gomes

      i had this problem too… try to init the service with: sudo /etc/init.d/logmein-hamachi start

      • Luiz Felipe B. Gomes

        it worked with me

    • Rajiv

      Try dropping the service and type sudo hamachi start

    • n nihao

      It just as no services now, it start automatically when system starts no problems xD (only in newer version of hamachi)

  • Luiz Felipe B. Gomes

    first thank you by the post… i had success to do it, but in the last step ‘sudo hamachi join 123456’, it returns ‘failed, network not found’. any idea? (i already

    replaced the 123456)

    • Luiz Felipe B. Gomes

      now it works… my problem is because i was using personal id of another PC, and not the id of network
      tks and sorry for bad english 😛

  • Aliasgar Babat

    Logmein is a great remote support tool, no doubt about that. But I and my wife often travel and we need better security and guaranteed connection for our remote support sessions. Hence, have switched over to RHUB. Its appliance simply works from behind my firewall.

  • andres

    Very helpful
    Im glad I found it.
    Thank you

  • Very helpful! I’m not a linux user but this helped me set up hamachi on ubuntu server seamlessly!

  • Fausto Paiva

    On Debian it is necessary to reboot system for VPN interfaces going up. You can edit /etc/rc.local and add to start automatically on boot:
    service logmein-hamachi start
    hamachi login