sodcalculator

10 Tech How-To

Install and Configure Hamachi on Ubuntu

Guide 10-9006 · Updated · Step by step

This guide walks you through installing LogMeIn Hamachi on Ubuntu and configuring it to create or join virtual private networks (VPNs). Hamachi creates a secure, direct peer-to-peer tunnel between computers over the internet, making them behave as if they were on the same local network. You’ll need a Ubuntu system with sudo access and an internet connection.

What You’ll Need

  • A Ubuntu installation (64-bit recommended).
  • An account with LogMeIn (free tier available) – you can sign up at the LogMeIn website.
  • Terminal access (Ctrl+Alt+T).
  • Internet connection to download packages.

Step-by-Step

  1. Update your system: Open a terminal and run sudo apt update && sudo apt upgrade -y to ensure your package list is current.
  2. Download the Hamachi package: Visit the official LogMeIn Hamachi download page for Linux. Look for the .deb package for Ubuntu (e.g., logmein-hamachi_2.1.0.198-1_amd64.deb). You can download it via browser or use wget with the direct link (right-click the download button and copy the link).
  3. Install the package: Navigate to the directory containing the downloaded file (usually ~/Downloads) and run: sudo dpkg -i logmein-hamachi_*.deb. If you get dependency errors, run sudo apt --fix-broken install to resolve them.
  4. Verify installation: Run hamachi --version in the terminal. You should see the version number and a usage summary. If not, try sudo hamachi --version (Hamachi often requires root).
  5. Start the Hamachi daemon: The service may start automatically. To ensure it’s running, use sudo systemctl start logmein-hamachi (or sudo service logmein-hamachi start on older systems). To make it start on boot, run sudo systemctl enable logmein-hamachi.
  6. Log in to your Hamachi account: Run sudo hamachi login. It will ask for your email and password. If you don’t have an account, create one first at the LogMeIn website, then come back.
  7. Join or create a network: To create a new network, use sudo hamachi create . To join an existing network, use sudo hamachi join . Replace placeholders with your actual network name and password (password is optional for your own network).
  8. Verify your connection: Run sudo hamachi list to see the network members and their IP addresses. You should see your own machine listed with a 25.x.x.x address.
  9. Test connectivity: From another machine on the same Hamachi network, ping your Hamachi IP (e.g., ping 25.0.1.2) to confirm the tunnel works.
  10. Configure firewall (if needed): Hamachi uses UDP port 17771 for its control traffic. If you have a strict firewall, allow outbound UDP to that port. For incoming connections, Hamachi uses direct peer-to-peer, so no inbound ports need to be open on your router.

Common Mistakes

  • Forgetting sudo: Hamachi commands must be run with sudo because they modify system network settings. Running without sudo gives a “permission denied” error.
  • Wrong architecture: Downloading the 32-bit package on a 64-bit system (or vice versa) causes installation failure. Check with uname -m; if it outputs x86_64, use the amd64 package.
  • Ignoring dependencies: The .deb package may require additional libraries. Always run sudo apt --fix-broken install after a failed dpkg.
  • Not logging in: You must log in before you can join or create networks. If you skip this, you’ll get an authentication error.
  • Using the wrong network name: Network names are case-sensitive and must match exactly. Double-check with the network owner.

Tips

  • Use a strong network password: Even for private networks, a password prevents unauthorized access.
  • Check the daemon status: If commands hang, use sudo systemctl status logmein-hamachi to see if the service is active.
  • Set up auto-login: You can store your credentials by running sudo hamachi login once; they are saved in the config file. After that, the daemon auto-logs in on boot.
  • Use the GUI (optional): There’s a third-party GUI called hamachi-gui but it’s not official. Stick to the CLI for reliability.
  • Keep the client updated: Periodically check for updates on the LogMeIn website, as the package in the repos may be outdated.

Troubleshooting

  • “Unable to connect to service” error: This means the daemon isn’t running. Start it with sudo systemctl start logmein-hamachi. If it fails, check logs with journalctl -u logmein-hamachi.
  • Login fails: Verify your credentials. If you’re sure they’re correct, try resetting your password on the LogMeIn website. Also, ensure your system time is correct – an incorrect clock can break TLS connections.
  • Can’t join a network: Confirm the network name and password are correct. Also, the network may be full (max 5 devices on free plan) or you may be banned. Check with the network owner.
  • Ping works but other services don’t: Hamachi creates a virtual network adapter. If services (like file sharing) don’t work, check the service’s firewall rules on the target machine. They may need to allow connections from the 25.0.0.0/8 range.
  • Hamachi IP not assigned: Run sudo hamachi list to see if you have an IP. If not, try restarting the daemon: sudo systemctl restart logmein-hamachi.
  • Slow performance: Hamachi uses peer-to-peer; if the direct connection fails, it relays through LogMeIn servers, which is slower. This is rare but can happen behind strict NATs.

Frequently Asked Questions

Is Hamachi free on Ubuntu?

Yes, LogMeIn offers a free plan that allows up to 5 devices per network. For more devices or advanced features, there’s a paid subscription.

Can I run Hamachi without sudo?

No, Hamachi requires root privileges to configure network interfaces. You must use sudo for all hamachi commands.

How do I uninstall Hamachi?

Use sudo dpkg -r logmein-hamachi to remove the package. To also remove configuration files, use sudo apt purge logmein-hamachi.

Does Hamachi work on Ubuntu Server?

Yes, the same CLI works on server editions. Just ensure you have the necessary dependencies (like lsb-release).

Can I use Hamachi to play LAN games?

Yes, many games that support LAN play will detect the Hamachi virtual adapter as a local network. You may need to disable your system firewall or allow the game through it.

Why is my Hamachi IP not 25.x.x.x?

Hamachi assigns IPs in the 25.0.0.0/8 range. If you see a different address, you might be using a legacy version or a different VPN. Check with sudo hamachi list.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →