LogMeIn Hamachi is a zero-configuration Virtual Private Network (VPN) that works with your existing firewall and allows you to access your computer no matter where you are, as long as there is an Internet connection.
While there is a nice interface for the Windows version, Linux users can only access Hamachi via the command line interface. Nevertheless, with some help from the open-source community, Linux users can now easily install, configure and use Hamachi. This tutorial demonstrates the process for Ubuntu.
Tip: if you can’t get the Ubuntu terminal to open to run commands, we have a few fixes for you.
How Hamachi Works
At its core, Hamachi is a proprietary VPN adapter that provides a virtual LAN through an overlay network.
Unlike traditional VPNs, such as NordVPN (see our NordVPN review for reference), Hamachi does not route any Internet traffic in and out of its servers. Instead, it allows you to create a secure, closed LAN between different computers, as Hamachi is useful in instances where you want to share a network service without exposing your host computer. For example, you can use it to start an SFTP server and share its contents only to a select few computers.
This Virtual LAN approach also allows you to use Hamachi for both peer-to-peer and local server gaming, making Hamachi invaluable for users who want to play games on Linux over the Internet without porting forward their connections.
Installing Hamachi in Ubuntu
- Download Hamachi’s .deb package from the developer’s website with the following command. (The Hamachi client software does not exist in the Ubuntu Software Repository.)
- Install the Hamachi package through
dpkgwith the following command. Unlike
dpkgis a manual package manager for Debian and Ubuntu.
sudo dpkg -i ./logmein-hamachi_22.214.171.124-1_amd64.deb
- Check whether you have properly installed Hamachi by running
sudo hamachi help.
Configuring Hamachi in Ubuntu
- Start setting up Hamachi on your Ubuntu machine. Configuring the program requires you to have a valid Hamachi account, which you can sign up for from the LogMeIn registration page.
- Once you have a valid account, you can use the Hamachi CLI to connect to the LogMeIn network:
sudo hamachi login
- Create a new Hamachi network from the command line. For example, I am running the following command to create a new network using the name “MySecretNetwork1.”
sudo hamachi create mysecretnetwork1 verysecurepassword
- With a network up and running, use the Hamachi CLI to connect two machines – install Hamachi on a separate computer and use the
sudo hamachi join mysecretnetwork1 verysecurepassword
Lastly, it is also possible to evict and delete an existing Hamachi network. For example, running the following commands will evict a peer using its Client ID and delete the network:
sudo hamachi evict mysecretnetwork1 088-167-874 sudo hamachi delete mysecretnetwork1
Managing a Hamachi Network With the Haguichi GUI
Aside from directly using the terminal, it is possible to use Haguichi to create and manage a Hamachi network. This third-party GUI wraps around the Hamachi CLI client and presents its functions in a desktop window, which is useful if you are a new user and still not comfortable with the Bash command line.
To install the Haguichi GUI, follow the steps below.
- Add the Haguichi repository to your Ubuntu machine:
sudo add-apt-repository -y ppa:ztefn/haguichi-stable
- Run the following commands to update your machine’s repository files and install the Haguichi GUI:
sudo apt update sudo apt install haguichi
- Run the Haguichi GUI by pressing Win and typing “haguichi.”
- A window will open, asking you to configure your Hamachi client. Press the green “Configure” button to proceed.
- The Haguichi GUI will create an account for your machine and display information about the current Hamachi version on your system.
- Click the “+” button in the title bar of the Haguichi GUI to open the menu that allows you to join or create a network, then click “Create Network.”
- A small prompt will open, asking for the details of your new network. I am naming it “MySecretNetwork1” and providing a secure password.
- With Haguichi running, connect other machines to your new network by clicking the “+” button and selecting “Join Network.”
- You will see a small prompt where you can provide your network details. In my case, I will connect to “MySecretNetwork1.”
Frequently Asked Questions
Is it possible to install Haguichi on non-Ubuntu systems?
Yes! While Haguichi is primarily available for Ubuntu and Debian systems, it is also possible to install this program on other Linux distributions. For example, you can run
sudo dnf copr enable ztfen/hacuighi && sudo dnf install haguichi to install the program in Fedora.
Further, Haguichi is also available in Flathub as a distribution-independent package that you can install with:
sudo flatpak install flathub com.github.ztefn.haguichi.
I cannot include the Haguichi PPA in my system.
This most likely happens due to an issue between your Internet provider and your machine’s IPv6 address resolver. By default, the Ubuntu Launchpad PPA system uses IPv6 when adding and removing repositories, which means that Ubuntu will use IPv6, whether or not your network connection can support it.
This connection mismatch can be an issue if your current network provider does not support IPv6. To fix this, disable your system’s IPv6 support by running sysctl:
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 to force Ubuntu to route every connection it makes to IPv4 instead.
Is it possible to manage my Hamachi clients outside of my Ubuntu machine?
Yes! It is possible using the
attach-net command along with your LogMeIn e-mail address:
sudo hamachi attach-net firstname.lastname@example.org.
That will link every Hamachi network you created in your Ubuntu machine to your online LogMeIn account, allowing you to remotely manage these networks even if your Ubuntu machine is offline.
Image credit: Unsplash. All alterations and screenshots by Ramces Red.
Our latest tutorials delivered straight to your inbox