Introduction
Hamachi is a lightweight personal VPN connector that is a breeze to setup but there can be some pain if you don’t know what to expect. As always Gentoo provides us with an ebuild that simplifies the installation process but getting up and running is still a little confusing.
Installation and Setup
User Specific Configurations
The obvious first step is `emerge -av hamachi` (this only available to ~arch right now so add to `package.keywords` as necessary). The following are the typical instructions to install hamachi on Gentoo from portage:
- Add to `packages.keywords` if necessary
- `emerge -av hamachi`
- `rc-update add tuncfg default`
After these steps have been taken you can run hamachi as any user on the system for ad-hoc VPN creation.
Server Wide Configuration
If you prefer to do a system wide on boot VPN with hamachi this is also possible but requires a slightly different setup:
- Add to `packages.keywords` if necessary
- `emerge -av hamachi`
- rc-update add hamachi default
Now all configuration should be placed inside `/etc/hamachi` for this setup so the system will automatically start routing traffic correctly.
Kernel Configuration
For hamachi to work correctly you do need the tun parameter in your kernel or loaded as a module. This parameter is located in Device Drivers->Network device support->Universal TUN/TAP device driver support.
Using Hamachi
Now that hamachi is on the system we need to start using it. The server-wide installation doesn’t require this (but I’m sure you can use this method to create a configuration usable by the server-wide instance) but the user specific usage does.
Starting hamachi is as simple as the following:
- `hamachi-init`
- `hamachi start`
- `hamachi login`
- `hamachi create [ ]`
- `hamachi join [ ]`
- `hamachi go-online `
That’s it. You’re now connected to a private network named . You can view who else is connected to your network with `hamachi list` and `hamachi get-nicks`.
Conclusion
Setting up a VPN can be daunting (see the OpenVPN configuration documentation) or it can be a breeze with hamachi. Need a quick VPN for LAN gaming or a VPN for performing maintenance over the internet on a device behind a firewall? Hamachi may be the quick solution you’re looking for.