I needed a quick and secure way to log in remotely to a machine running Fedora 17 from Windows and Linux clients.
The solution I chose was LogMeIn Hamachi which I have used in the past to manage the occasional Windows box. It is free (for a maximum of a few clients), quite easy to setup and works through typical home nat setups without having to configure port-forwarding.
Warning: LogMeIn Hamachi is a proprietary centrally-managed VPN system.
Setup your LogMeIn environment:
- First create a (free) LogMeIn account if you haven’t got one.
- Log on to your account and add a network in control-panel.
- Configure the network so you have to approve all new joiners to this network.
- If you don’t want to approve new-joiners you can rely on assigning a password to the network. You can also require both approval and a password.
- Take note of the network id, you will need this later.
The Linux Hamachi client is currently a beta and console only. To complete the next steps you need a root shell.
On the Fedora machine you download the rpm installation package from the LogMeIn Labs.
Hamachi assumes your system is Linux Standard Base (LSB) 3.0 compliant in its start/stop scripts so make sure your machine is LSB compatible. You can do this by installing the required package(s) with:
yum install redhat-lsb-core
This will download and install the lsb-core functions and all of the dependencies. If the packages are already in place yum will tell you.
Install the hamachi rpm package with yum. For example:
yum install logmein-hamachi-18.104.22.168-1.x86_64.rpm
Starting and configuring the VPN:
Next step is to start your vpn with:
service logmein-hamachi start
With chkconfig logmein-hamachi on and chkconfig logmein-hamachi off you can control the starting of the VPN at system boot.
The first time you have to manually login hamachi with:
After which you can assign a nick for your machine so the other peers see a client name.
hamachi set-nick <nickname>
You can find your IPv4 and / or IPv6 addresses by issueing ip a of ifconfig and looking for a ham interface. Most of the time your VPN interface will be called ham0.
Connecting to the network:
Connect the client to the network you created in your LogMeIn control panel. If you configured the network with a password you run join followed by the network id after which you enter the network password.
hamachi join <network id>
If you configured the network to have you approve new peers you run do-join followed by the network id. Enter the password if you have configured one for the network, if you didn’t just hit the enter button.
hamachi do-join <network id>
Go back to your LogMeIn control panel and approve the new peer for the network.
To list the other network members run:
In my case the network is called experiment and there is another Linux box with the nick laptop connected:
* [123-456-789]experiment capacity: 2/5, subscription type: Free
987-654-321 laptop 25.xxx.xxx.xxx alias: not set
And that is basically all you need to get running. You can find a lot of information in the README located in /opt/logmein-hamachi/README.