Difference between revisions of "Hamachi"

From ArchWiki
Jump to: navigation, search
(Move to sub category.)
(automatic style fixes)
Line 1: Line 1:
 
[[Category:Virtual Private Network]]
 
[[Category:Virtual Private Network]]
 +
{{i18n|Hamachi}}
  
 
[[Wikipedia:Hamachi (software)|Hamachi]] is a proprietary (closed source) commercial VPN software. With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.
 
[[Wikipedia:Hamachi (software)|Hamachi]] is a proprietary (closed source) commercial VPN software. With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.
  
=Initial Configuration=
+
==Initial Configuration==
  
 
To run Hamachi you need /dev/net/tun.  
 
To run Hamachi you need /dev/net/tun.  
  
 
This is created by the tun module. As root run,
 
This is created by the tun module. As root run,
<pre>
+
{{bc|
 
modprobe tun
 
modprobe tun
</pre>
+
}}
  
 
Or you can manually create /dev/net/tun by running...
 
Or you can manually create /dev/net/tun by running...
<pre>
+
{{bc|
 
mkdir /dev/net
 
mkdir /dev/net
 
mknod /dev/net/tun c 10 200
 
mknod /dev/net/tun c 10 200
</pre>
+
}}
  
 
Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.
 
Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.
  
<pre>
+
{{bc|1=
 
MODULES=(... ... ... ... ... tun ... ... ...)
 
MODULES=(... ... ... ... ... tun ... ... ...)
</pre>
+
}}
  
=Download And Install Hamachi=
+
==Download And Install Hamachi==
==Manual installation==
+
===Manual installation===
 
{{accuracy|reason=Why use make install and skip package management?}}
 
{{accuracy|reason=Why use make install and skip package management?}}
 
Head to [http://files.hamachi.cc/linux/ hamachi.cc] and download their linux client.
 
Head to [http://files.hamachi.cc/linux/ hamachi.cc] and download their linux client.
  
 
Untar it  
 
Untar it  
<pre>
+
{{bc|
 
tar zxvf hamachi-x.x.x-x.tar.gz
 
tar zxvf hamachi-x.x.x-x.tar.gz
</pre>
+
}}
  
 
Compile:
 
Compile:
<pre>
+
{{bc|
 
cd hamachi-x.x.x-x
 
cd hamachi-x.x.x-x
 
make install
 
make install
</pre>
+
}}
  
 
And run tunecfg
 
And run tunecfg
<pre>
+
{{bc|
 
cd tuncfg
 
cd tuncfg
 
./tuncfg
 
./tuncfg
</pre>
+
}}
  
 
Run hamachi-init
 
Run hamachi-init
<pre>
+
{{bc|
 
$hamachi-init
 
$hamachi-init
</pre>
+
}}
 
And thats the installation.
 
And thats the installation.
  
==Version 2 beta==
+
===Version 2 beta===
  
 
Version 2 of the Linux Hamachi client exists, and is currently in beta.  It is available from [https://secure.logmein.com/US/labs/ the labs page on the hamachi website].
 
Version 2 of the Linux Hamachi client exists, and is currently in beta.  It is available from [https://secure.logmein.com/US/labs/ the labs page on the hamachi website].
Line 58: Line 59:
 
{{aur|hamachi}} is available in the [[AUR]]. The vendor's tarball requires LSB and will not install correctly.
 
{{aur|hamachi}} is available in the [[AUR]]. The vendor's tarball requires LSB and will not install correctly.
  
=Running Hamachi=
+
==Running Hamachi==
 
Start up the (matt) daemon
 
Start up the (matt) daemon
<pre>
+
{{bc|
 
$hamachi start
 
$hamachi start
</pre>
+
}}
 
Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory.  
 
Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory.  
  
<pre>
+
{{bc|
 
$hamachi set-nick bob
 
$hamachi set-nick bob
 
$hamachi login
 
$hamachi login
Line 72: Line 73:
 
$hamachi list
 
$hamachi list
 
$hamachi go-offline my-net
 
$hamachi go-offline my-net
</pre>
+
}}
  
 
To get a list of all the commands just run:
 
To get a list of all the commands just run:
<pre>
+
{{bc|
 
$hamachi ?
 
$hamachi ?
</pre>
+
}}
  
 
'''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.
 
'''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==
+
===As a Daemon===
  
 
You can run hamachi as a daemon this way:
 
You can run hamachi as a daemon this way:
Line 87: Line 88:
 
Copy your configuration to ''/root'' directory:
 
Copy your configuration to ''/root'' directory:
  
<pre>
+
{{bc|
 
cp -R ~/.hamachi /root/
 
cp -R ~/.hamachi /root/
</pre>
+
}}
  
 
Create a script in ''/etc/rc.d/'' called ''hamachi'' using your preferred editor:
 
Create a script in ''/etc/rc.d/'' called ''hamachi'' using your preferred editor:
  
<pre>
+
{{bc|<nowiki>
 
. /etc/rc.conf
 
. /etc/rc.conf
 
. /etc/rc.d/functions
 
. /etc/rc.d/functions
Line 134: Line 135:
 
esac
 
esac
 
exit 0
 
exit 0
</pre>
+
</nowiki>}}
  
 
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''.
Line 140: Line 141:
 
And do not forget to:  
 
And do not forget to:  
  
<pre>
+
{{bc|
 
chmod +x /etc/rc.d/hamachi
 
chmod +x /etc/rc.d/hamachi
</pre>
+
}}
  
=GUI=
+
==GUI==
 
Various GUI frontends to hamachi are available in the AUR.
 
Various GUI frontends to hamachi are available in the AUR.
  
Line 158: Line 159:
 
*haguichi (Gtk2, mono)
 
*haguichi (Gtk2, mono)
  
=Troubleshooting=
+
==Troubleshooting==
==If Hamachi times out soon after launch==
+
===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:
 
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:
 
   
 
   
<pre>
+
{{bc|
 
KeepAlive 10
 
KeepAlive 10
</pre>
+
}}
  
==If you have problem connecting to some hosts==
+
===If you have problem connecting to some hosts===
Check if they are using Hamachi2, if that is the case then it's a known issue in Hamachi2 client connecting to the Hamachi linux client.
+
Check if they are using Hamachi2, if that is the case then it is a known issue in Hamachi2 client connecting to the Hamachi linux client.
  
==If ''/etc/init.d/logmein-hamachi'' is not found==
+
===If ''/etc/init.d/logmein-hamachi'' is not found===
 
Replace this with ''/etc/rc.d/logmein-hamachi''.
 
Replace this with ''/etc/rc.d/logmein-hamachi''.
  
==Error when trying to run hamachi-init==
+
===Error when trying to run hamachi-init===
 
If there is error while trying to load libstdc++.so.5 you want to install it can be found from extra repository so you can install it with Pacman -S libstdc++5
 
If there is error while trying to load libstdc++.so.5 you want to install it can be found from extra repository so you can install it with Pacman -S libstdc++5
  
 
If you get error while trying to load libcrypto.so.0.9.7 temporarily solution is to create link from /usr/lib/libcrypto.so.0.9.7 to /usr/lib/libcrypto.so with ln -s /usr/lib/libcrypto.so /usr/lib/libcrypto.so.0.9.7
 
If you get error while trying to load libcrypto.so.0.9.7 temporarily solution is to create link from /usr/lib/libcrypto.so.0.9.7 to /usr/lib/libcrypto.so with ln -s /usr/lib/libcrypto.so /usr/lib/libcrypto.so.0.9.7
  
==See also==
+
===See also===
 
* [https://secure.logmein.com/products/hamachi/ Project home page]
 
* [https://secure.logmein.com/products/hamachi/ Project home page]

Revision as of 11:48, 28 May 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Hamachi is a proprietary (closed source) commercial VPN software. With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.

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

Manual installation

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Why use make install and skip package management? (Discuss in Talk:Hamachi#)

Head to hamachi.cc and download their linux client.

Untar it

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

Compile:

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

And run tunecfg

cd tuncfg
./tuncfg

Run hamachi-init

$hamachi-init

And thats the installation.

Version 2 beta

Version 2 of the Linux Hamachi client exists, and is currently in beta. It is available from the labs page on the hamachi website.

hamachiAUR is available in the AUR. The vendor's tarball requires LSB and will not install correctly.

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

DAEMON=/usr/bin/hamachi
NAME=hamachi
DESC="Hamachi VPN client"
PID_FILE=/var/run/daemons/hamachi

case "$1" in
    start)
        #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
            stat_fail
        else
            add_daemon $NAME
            stat_done
        fi
        ;;
    stop)
        stat_busy "Stopping $DESC"
        [ -f $PID_FILE ] && $DAEMON -c /root/.hamachi $1 > /dev/null
        if [ $? -gt 0 ]; then
            stat_fail
        else
            rm_daemon $NAME
            stat_done
        fi
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "usage: $0 {start|stop|restart}"
	;;
esac
exit 0

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

And do not forget to:

chmod +x /etc/rc.d/hamachi

GUI

Various GUI frontends to hamachi are available in the AUR.

For hamachi 1:

  • haguichi (Gtk2, mono)
  • ghamachi (Gtk2)
  • hamachi-gui (Gtk2)

For hamachi 2 beta:

  • quamachi (Qt4)
  • haguichi (Gtk2, mono)

Troubleshooting

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

If you have problem connecting to some hosts

Check if they are using Hamachi2, if that is the case then it is a known issue in Hamachi2 client connecting to the Hamachi linux client.

If /etc/init.d/logmein-hamachi is not found

Replace this with /etc/rc.d/logmein-hamachi.

Error when trying to run hamachi-init

If there is error while trying to load libstdc++.so.5 you want to install it can be found from extra repository so you can install it with Pacman -S libstdc++5

If you get error while trying to load libcrypto.so.0.9.7 temporarily solution is to create link from /usr/lib/libcrypto.so.0.9.7 to /usr/lib/libcrypto.so with ln -s /usr/lib/libcrypto.so /usr/lib/libcrypto.so.0.9.7

See also