How to Install and Configure Hamachi in Ubuntu Installation Guide

LogMeIn Hamachi is a powerful zero-configuration Virtual Private Network (VPN) that allows you to access your computer from anywhere, working seamlessly with your existing firewall. Here’s a step-by-step guide to installing and configuring Hamachi on Ubuntu.

Downloading and Installing Hamachi

To install Hamachi on Ubuntu, you need to download the .deb package from the official website and then install it using the dpkg package manager.

  1. Download the Hamachi Package:
    wget https://www.vpn.net/installers/logmein-hamachi_2.1.0.203-1_amd64.deb
    
  2. Install the Package:
    sudo dpkg -i ./logmein-hamachi_2.1.0.203-1_amd64.deb
    
  3. Verify the Installation:
    Check if Hamachi is properly installed by running:
    sudo hamachi help
    

Configuring Hamachi

Creating a Hamachi Account

Before you can use Hamachi, you need a valid Hamachi account. Sign up for an account on the LogMeIn registration page if you haven’t already.

Logging In to Hamachi

  1. Log In to Hamachi:
    Use the following command to log in to your Hamachi account:
    sudo hamachi login
    
  2. Attach to Your LogMeIn Central Account (Optional):
    If you want to manage your networks from the LogMeIn website, attach your Hamachi client to your LogMeIn Central account:
    sudo hamachi attach [[email protected]]
    

Creating a New Hamachi Network

  1. Create a New Network:
    Use the following command to create a new Hamachi network:
    sudo hamachi create mysecretnetwork1 verysecurepassword
    
  2. Joining a Hamachi Network:
    To join another machine to the network, use:
    sudo hamachi join mysecretnetwork1 verysecurepassword
    

Managing Hamachi Networks

Using the Command Line Interface

  1. List Networks:
    To list all available networks, use:
    sudo hamachi list
    
  2. Join a Network:
    To join an existing network, use:
    sudo hamachi join network-name password
    
  3. Evict and Delete a Network:
    To evict a peer and delete a network, use:
    sudo hamachi evict network-name client-id
    sudo hamachi delete network-name
    

Using Haguichi GUI for Hamachi

For users who prefer a graphical interface, Haguichi is a useful tool that wraps around the Hamachi CLI client.

  1. Add the Haguichi Repository:
    sudo add-apt-repository -y ppa:ztefn/haguichi-stable
    
  2. Update and Install Haguichi:
    sudo apt update
    sudo apt install haguichi
    
  3. Run Haguichi:
    Press the Win key and type “haguichi” to open the application.
  4. Configure Haguichi:
    • Click the green “Configure” button to proceed.
    • Haguichi will create an account for your machine and display information about the current Hamachi version.
  5. Create or Join a Network:
    • Click the “+” button in the title bar to open the menu.
    • Select “Create Network” or “Join Network” and follow the prompts to enter your network details.

Additional Configuration for IP Tunnelling

If you encounter issues with IP tunnelling, ensure that the tun module is enabled in your kernel.

  1. Enable IP Tunnelling:
    sudo modprobe tun
    
  2. Add the tun Module to /etc/modules:
    sudo gedit /etc/modules
    

    Add tun to the list of modules if it is not already included.

  3. Create a Valid IP Tunnel Node:
    ls /dev/net/tun
    

    If you get a "No Such File or Directory" error, create a new node:

    sudo mkdir /dev/net
    sudo mknod /dev/net/tun c 10 200
    

Setting User Permissions

For security, set the permissions so that Hamachi can only be started by members of the hamachi group.

  1. Create the hamachi Group:
    sudo groupadd hamachi
    
  2. Add Your User to the Group:
    sudo gpasswd -a $USER hamachi
    sudo gpasswd -a root hamachi
    
  3. Set Socket Permissions:
    sudo chmod 760 /var/run/tuncfg.sock
    sudo chgrp hamachi /var/run/tuncfg.sock
    

By following these steps, you can successfully install and configure Hamachi on your Ubuntu system, ensuring secure and seamless access to your computer from anywhere.

Leave a Reply

Your email address will not be published. Required fields are marked *