Logmein.com has been a great service to anyone who runs a windows computer and would like to be able to access it securely from anywhere on the internet. Their website is straight forward and easy to use. They offer free and paid versions of their service that will give you different feature sets such as sound and file transfer. It is a simple setup and makes it easy to work remotely. But for those who have more than a single computer or network based service and may want to securely access their entire network from a remote computer you would have had to buy software or hardware that allowed for Virtual Private Networks. This could be expensive or required you to go through complicated setup procedures. Today logmein’s Hamachi software VPN allows you to manage your remote VPN network and access to it through their website. It is easy to join several computers to a virtual private network and share resources between them. Lets get our Ubuntu 10.10 work station connected to a Hamachi VPN.
First you will need to download the linux client software. There is an old 0.9.9.9-20 client floating around out there. This works, but its old, and there is a new beta client out there.
Visit the LogMeIn Hamachi Beta Labs Site and download the DEB package.
Download 32-bit version:
$ wget https://secure.logmein.com/labs/logmein-hamachi_220.127.116.11-1_i386.deb
Download 64-bit version:
$ wget https://secure.logmein.com/labs/logmein-hamachi_18.104.22.168-1_amd64.deb
Now install the package. Please note that if you have an old version of Hamachi installed, you will need to uninstall it before you move on.
$ sudo aptitude install lsb && sudo dpkg -i logmein-hamachi_22.214.171.124-1_amd64.deb
$ sudo aptitude install lsb && sudo dpkg -i logmein-hamachi_126.96.36.199-1_i386.deb
The above will install a dependency lsb, which is stated as required on the Lab page, and then install the downloaded package.
Now, we start the service
$ sudo service logmein-hamachi start
Now, we can use the hamachi command to configure and connect to networks. Let us take a look at the command line options:
$ hamachi –help
LogMeIn Hamachi, a zero-config virtual private networking utility, ver 188.8.131.52
usage: hamachi [command]
command specifies an action. Can be one of the following –
# set-nick <nickname>
peer <client id>
network <network id>
# create <network id> [<password>]
set-pass <network id> [<password>]
set-access <network id> [lock|unlock] [manual|auto]
delete <network id>
evict <network id> <client id>
# approve <network id> <client id>
reject <network id> <client id>
# join <network id> [<password>]
do-join <network id> [<password>]
leave <network id>
# go-online <network id>
go-offline <network id>
# attach <LogMeIn account>
attach-net <LogMeIn account>
# gw-config <network id>
[dhcp|static [net <start ip> <end ip> <netmask> <default gateway>]
[domain <dns domain>]
[dns <dns ip 1> [<dns ip 2>]]]
[del <remote subnet CIDR> …]
[add <remote subnet CIDR> …]
If no command is specified, hamachi displays its status including version,
pid, client id, online status, nickname and the LogMeIn account
So, lets get started. First we set a nick name for this computer on the network. This will show up in the Join requests and on the peer lists. We will need to have a Network created and its ID available to join it.
$ sudo hamachi do-join 057-682-285
$ sudo hamachi set-nick officepc
$ sudo hamachi login
Joining 057-682-285 .. ok, request sent, waiting for approval
You will replace “057-682-285” with your own network ID. When prompted for a password, press enter since we don’t use a password to join this network, it’s a manual approval network. Once you see the waiting for approval message, log into your LogMeIn account and approve access for this computer.
$ sudo hamachi list
You should see a list of networks you are joined to, currently one, the name of the network and a list of other peers connected to it. You will see the VPN IP address also of this peer. This is always in the 184.108.40.206 network. The other peer connected to my network is 220.127.116.11. Test connectivity using ping.
$ ping 18.104.22.168
If you get ping response, your connected and ready to go!