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.
- Download the Hamachi Package:
wget https://www.vpn.net/installers/logmein-hamachi_2.1.0.203-1_amd64.deb
- Install the Package:
sudo dpkg -i ./logmein-hamachi_2.1.0.203-1_amd64.deb
- 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
- Log In to Hamachi:
Use the following command to log in to your Hamachi account:sudo hamachi login
- 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
- Create a New Network:
Use the following command to create a new Hamachi network:sudo hamachi create mysecretnetwork1 verysecurepassword
- 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
- List Networks:
To list all available networks, use:sudo hamachi list
- Join a Network:
To join an existing network, use:sudo hamachi join network-name password
- 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.
- Add the Haguichi Repository:
sudo add-apt-repository -y ppa:ztefn/haguichi-stable
- Update and Install Haguichi:
sudo apt update sudo apt install haguichi
- Run Haguichi:
Press theWin
key and type “haguichi” to open the application. - 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.
- 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.
- Enable IP Tunnelling:
sudo modprobe tun
- Add the
tun
Module to/etc/modules
:sudo gedit /etc/modules
Add
tun
to the list of modules if it is not already included. - 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.
- Create the
hamachi
Group:sudo groupadd hamachi
- Add Your User to the Group:
sudo gpasswd -a $USER hamachi sudo gpasswd -a root hamachi
- 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.