- To being we must install the ‘tun’ module to enable IP Tunneling support for the Linux kernel. Most do not have this setup by default.
- Open the modules file and add ‘tun’ to the list
- Your file should look similar to the example below.
- Save the file and exit out of nano (Ctrl-O to save & Ctrl-X to exit), lets move on and verify that a tunneling node has been created. (*If you have compiled your own kernel you likely need to recompile it with IP Tunneling support if you receive an error with modprobe. This is not covered in this guide. And if you are unsure, you most likely did not compile yourself and you would definitely remember doing so.)
- You should recieve a response like the example below
- If you received something along the lines of “No Such File or Directory” you may need to manually create the node in step 6. If you received the same response as I did, jump to step 7.
$ sudo mkdir /dev/net
$ sudo mknod /dev/net/tun c 10 200Jump back to Step 4 and you should now receive the correct response.
- With our IP Tunnel node created, it is time to install Hamachi itself. First download the latest version. As of writing this guide, the latest version is 0.9.9.9-20
- Extract our newly downloaded archive
- Navigate into the extracted directory
- Start the installation
- Run the tunnel
- This should complete the install, we will now configure the user permission in order for it to run correctly. Create a ‘hamachi’ user group
- Add youself as a user to the ‘hamachi’ group. Be sure to replace your user name where appropriate.
- Add the root user to the ‘hamachi’ group
- Set the correct permissions for the tuncfg socket
- Change the ownership of the socket file
- That should do it for the permissions, Now onto setting Hamachi up & configuring it to start as a system service.
- Start hamachi
- Set your computer’s nickname
- Login to the Hamachi network
- To join an existing network (optional) “NETWORKNAME” and “PASSKEY” should be replaced with your network name and network password
- To create a new network (optional) “NETWORKNAME” and “PASSKEY” should be replaced with your network name and network password
- If you joined an existing network you must tell hamachi to then “go-online”. Be sure to replace NETWORKNAME with your relevant network name.
- Check your hamachi status to verify everything is as it should be
$ sudo modprobe tun
$ sudo nano /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
lp
rtc
tun
$ ls /dev/net/tun
/dev/net/tun
$ wget http://files.hamachi.cc/linux/hamachi-0.9.9.9-20-lnx.tar.gz
Expected output below
--2009-07-31 20:28:25-- http://files.hamachi.cc/linux/hamachi-0.9.9.9-20-lnx.tar.gz
Resolving files.hamachi.cc... 69.25.20.50
Connecting to files.hamachi.cc|69.25.20.50|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 344866 (337K) [text/plain]
Saving to: `hamachi-0.9.9.9-20-lnx.tar.gz'
100%[====================================================================>] 344,866 448K/s in 0.8s
2009-07-31 20:28:26 (448 KB/s) - `hamachi-0.9.9.9-20-lnx.tar.gz' saved [344866/344866]
$ tar zxvf hamachi-0.9.9.9-20-lnx.tar.gz
Expected output below
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
$ cd hamachi-0.9.9.9-20-lnx/
$ sudo make install
Expected output below
Copying hamachi into /usr/bin ..
Creating hamachi-init symlink ..
Compiling tuncfg ..
Copying tuncfg into /sbin ..
Hamachi is installed. See README for what to do next.
$ sudo tuncfg
$ sudo groupadd hamachi
$ sudo gpasswd -a YOURUSERNAME hamachi
$ sudo gpasswd -a root hamachi
$ sudo chmod 760 /var/run/tuncfg.sock
$ sudo chgrp hamachi /var/run/tuncfg.sock
$ sudo hamachi-init -c /etc/hamachi
Expected output
Initializing Hamachi configuration (/etc/hamachi). Please wait ..
generating 2048-bit RSA keypair .. ok
making /etc/hamachi directory .. ok
saving /etc/hamachi/client.pub .. ok
saving /etc/hamachi/client.pri .. ok
saving /etc/hamachi/state .. ok
Authentication information has been created. Hamachi can now be started with
'hamachi start' command and then brought online with 'hamachi login'.
$ sudo hamachi -c /etc/hamachi start
Expected output
Starting Hamachi hamachi-lnx-0.9.9.9-20 .. ok
$ sudo hamachi -c /etc/hamachi set-nick "COMPUTERNICKNAME"
$ sudo hamachi -c /etc/hamachi login
$ sudo hamachi -c /etc/hamachi join NETWORKNAME PASSKEY
$ sudo hamachi -c /etc/hamachi create NETWORKNAME PASSKEY
$ sudo hamachi -c /etc/hamachi go-online NETWORKNAME
$ sudo hamachi -c /etc/hamachi
Expected output
Hamachi, a zero-config virtual private networking utility, ver 0.9.9.9-20
version : hamachi-lnx-0.9.9.9-20
pid : 5472
status : logged in
nickname : JauntyVM
Tidak ada komentar:
Posting Komentar