Difference between revisions of "Hamachi"

From ArchWiki
Jump to: navigation, search
(Manual installation)
(As a Daemon)
Line 175: Line 175:
Remeber to add ''hamachi'' to your ''daemons'' array in ''/etc/rc.conf'', it should be put after ''tuntap''.
Remeber to add ''hamachi'' to your ''daemons'' array in ''/etc/rc.conf'', it should be put after ''tuntap''.
And don't forget to:
chmod +x /etc/rc.d/hamachi

Revision as of 16:52, 7 March 2010


With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.

Hamachi is fast, secure and simple. It is also free.

External Links

Hamachi public networks for popular Games : www.hamachi.cz
English translate : www.eng.hamachi.cz
Individual help : www.Forum.hamachi.cz

Initial Configuration

To run Hamachi you need /dev/net/tun.

This is created by the tun module. As root run,

modprobe tun

Or you can manually create /dev/net/tun by running...

mkdir /dev/net
mknod /dev/net/tun c 10 200

Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.

MODULES=(... ... ... ... ... tun ... ... ...)

Download And Install Hamachi

From the AUR

Hamachi is available in the AUR, here.

Download the package, untar it, and run...


in the hamachi directory that is created.

Then add the package with...

pacman -A hamachi-(package version)

Now as root run...


Finally, run hamachi-init


Manual installation

Or you can get it manually.

Head to hamachi.cc and download their linux client.

Untar it

tar zxvf hamachi-x.x.x-x.tar.gz


cd hamachi-x.x.x-x
make install

And run tunecfg

cd tuncfg

Run hamachi-init


And thats the installation.

Running Hamachi

Start up the (matt) daemon

$hamachi start

Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory.

$hamachi set-nick bob
$hamachi login
$hamachi create my-net secretpassword
$hamachi go-online my-net
$hamachi list
$hamachi go-offline my-net

To get a list of all the commands just run:

$hamachi ?

Note: Make sure you change the status of the channel(s) you are in to online if you want to perform any network actions on computers in there.

As a Daemon

You can run hamachi as a daemon this way:

Copy your configuration to /root directory:

cp -R ~/.hamachi /root/

Create a script in /etc/rc.d/ called hamachi using your preferred editor:

. /etc/rc.conf
. /etc/rc.d/functions

DESC="Hamachi VPN client"

case "$1" in
        #Check for running tuntap, start when not running
        ck_daemon tuntap && /etc/rc.d/tuntap start
        stat_busy "Starting $DESC"
        $DAEMON -c /root/.hamachi $1 > /dev/null
        if [ $? -gt 0 ]; then
            add_daemon $NAME
        stat_busy "Stopping $DESC"
        [ -f $PID_FILE ] && $DAEMON -c /root/.hamachi $1 > /dev/null
        if [ $? -gt 0 ]; then
            rm_daemon $NAME
        $0 stop
        $0 start
        echo "usage: $0 {start|stop|restart}"
exit 0

Remeber to add hamachi to your daemons array in /etc/rc.conf, it should be put after tuntap.

And don't forget to:

chmod +x /etc/rc.d/hamachi


I found this link on the forums at hamachii. Its a GTK2+ GUI frontend. Not bad if your into that sort of thing.

Hamachi GUI


If Hamachi times out soon after launch

If hamachi stops working after a short period of time it can be that the client is timing out. Create ~/.hamachi/config and add the following to it:

KeepAlive 10