contributers
quick links
Hamachi on AMD64 GNU/Linux... easy!
Posted 1:23:09 PM on Fri, 15th February 2008 by Dj-ZoRt! Image #20

There is a lot of people out there annoyed that hamachi 'wont run' on GNU/linux for AMD64. Likely this is mainly because hamachi is game oriented and Linux gamers often lack really indepth linux skills. Maybe, maybe not. But either way here is how to get it to run on your AMD64 system - regardless of your distribution (i personally run Debian, i have also made this work on OpenSUSE as well... it will work on any distribution.

So lets start by downloading hamachi (this link may need updating)

[dean@cache dean]# su
.. etc ..
[root@cache dean]# cd /tmp/
[root@cache tmp]# wget http://files.hamachi.cc/linux/hamachi-0.9.9.9-20-lnx.tar.gz
... file downloads ...
[root@cache tmp]# tar zxvf hamachi-0.9.9.9-20-lnx.tar.gz
hamachi-0.9.9.9-20-lnx/
hamachi-0.9.9.9-20-lnx/Makefile
hamachi-0.9.9.9-20-lnx/LICENSE
hamachi-0.9.9.9-20-lnx/README
hamachi-0.9.9.9-20-lnx/LICENSE.tuncfg
hamachi-0.9.9.9-20-lnx/LICENSE.openssh
hamachi-0.9.9.9-20-lnx/LICENSE.openssl
hamachi-0.9.9.9-20-lnx/hamachi
hamachi-0.9.9.9-20-lnx/tuncfg/
hamachi-0.9.9.9-20-lnx/tuncfg/Makefile
hamachi-0.9.9.9-20-lnx/tuncfg/tuncfg.c
hamachi-0.9.9.9-20-lnx/tuncfg/tuncfg
hamachi-0.9.9.9-20-lnx/CHANGES
[root@cache tmp]# cd hamachi-0.9.9.9-20-lnx
 
So we have downloaded and extracted the hamachi tar.gz file into /tmp/
Then we move on to other things.

The 'tuncfg' portion of hamachi will compile without any issues. The actual 'hamachi' binary file is a binary, but its encrypted and compressed with 'upx'. So to make it work, we just need to extract it. Easy!

At this stage, some distributions may actually run the binary. CentOS seems to do so out of the box. So try it like so...

[root@cache hamachi-0.9.9.9-20-lnx]# arch
x86_64
[root@cache hamachi-0.9.9.9-20-lnx]# ./hamachi
Cannot find configuration directory /root/.hamachi. Have you run 'hamachi-init' ?
[root@cache hamachi-0.9.9.9-20-lnx]#


Otherwise we will just need to uncompress it with 'upx'. Once again, the link below may break. So check out upx.sf.net for the real file.
Your dist will likely have a proper package, but i will just use the tar.gz so we can delete it later with the hamachi install files.

[root@cache hamachi-0.9.9.9-20-lnx]# wget http://upx.sourceforge.net/download/upx-3.02-amd64_linux.tar.bz2
.. the file downloads ...
[root@cache hamachi-0.9.9.9-20-lnx]# tar jxvf upx-3.02-amd64_linux.tar.bz2
upx-3.02-amd64_linux/
upx-3.02-amd64_linux/BUGS
upx-3.02-amd64_linux/COPYING
upx-3.02-amd64_linux/LICENSE
upx-3.02-amd64_linux/NEWS
upx-3.02-amd64_linux/README
upx-3.02-amd64_linux/README.1ST
upx-3.02-amd64_linux/THANKS
upx-3.02-amd64_linux/TODO
upx-3.02-amd64_linux/upx
upx-3.02-amd64_linux/upx.1
upx-3.02-amd64_linux/upx.doc
upx-3.02-amd64_linux/upx.html
[root@cache hamachi-0.9.9.9-20-lnx]# mv upx-3.02-amd64_linux/upx ./
[root@cache hamachi-0.9.9.9-20-lnx]#


So we extract and move upx, its still in the hamachi directory so it will wipe easily later. Im not proposing you avoid your package system! Just that for a once off usage you may as well go this way. Extract as so...

[root@cache hamachi-0.9.9.9-20-lnx]# ./upx -d hamachi
                       Ultimate Packer for eXecutables
  Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007
UPX 3.02        Markus Oberhumer, Laszlo Molnar & John Reiser   Dec 16th 2007

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    830676 <-    331144   39.86%    linux/386    hamachi

Unpacked 1 file.
[root@cache hamachi-0.9.9.9-20-lnx]# ldd ./hamachi
        linux-gate.so.1 =>  (0xffffe000)
        libm.so.6 => /lib/libm.so.6 (0x4f7e4000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7fe2000)
        libc.so.6 => /lib/libc.so.6 (0x4f59a000)
        /lib/ld-linux.so.2 (0x4f57d000)
[root@cache hamachi-0.9.9.9-20-lnx]#


So now the hamachi binary is ready to go. Observe that ldd now knows whats what with the binary, previously ldd would give you ' not a dynamic executable'.

Now, do all the usual hamachi steps! (make, make install, hamachi-init etc. See the README file that comes with hamachi). gHamachi and init scripts are out there. So go find them if you like!

I have played numerous linux native and windows (through wine and or cedega) using hamachi in this way. Its quite easy! Not to mention ssh over hamachi. So watch out, as hamachi will expose  your machine to the VPN network even when you are behind a ADSL/IP router with firewall facilities. Hamachi uses 5.0.0.0/8 network addresses which may also get around your local iptables rules.

comments

Cedega is total rubbish now, use wine or crossover games.

Posted by Bside
post a new comment

Alias/Name
Email/Website
Validate
Comment
Rating 0 0.5 1 1.5 2 2.5 3 3.5 4