How To Install Hamachi On Fedora 9

25 August 2008

Version 1.0
Author: Andy Ru <webtechy [at] gmail [dot] com>

This tutorial explains how to install Hamachi on a Fedora 9 server. Hamachi is a VPN service that easily sets up in 10 minutes, and enables secure remote access to your business network, anywhere there’s an Internet connection. It works with your existing firewall, and requires no additional configuration. Hamachi is the first networking application to deliver an unprecedented level of direct peer-to-peer connectivity. It is simple, secure, and cost-effective.

This howto is meant to document things specifically for Fedora 9 and can be used as a guide for other distributions but mainly describes steps which are needed in Fedora-based distributions.
 
This document comes without warranty of any kind! I want to say that this is not the only way of setting up this configuration. There are many ways to configure the setup below but I do not issue any guarantee that this will work for you!

1 Download Hamachi

Hamachi can be downloaded from the main website here:

https://secure.logmein.com/products/hamachi/download.asp

Download the 0.9.9.9-20 Linux version with the following filename:

hamachi-0.9.9.9-20-lnx.tar.gz

Or skip all that and do a wget on the file from the link here:

wget http://files.hamachi.cc/linux/hamachi-0.9.9.9-20-lnx.tar.gz

Ungzip and extract the tar file to a folder and then cd into the directory:

tar-xvf hamachi-0.9.9.9-20-lnx.tar.gz
cd hamachi-0.9.9.9-20-lnx

Make sure you are able to sudo or su to root for the next step.

 

2 Install and recompile tuncfg

In order to run hamachi you will need to fix the path for ifconfig in most Fedora-based distributions.

cd tuncfg

(I took this information from a post by feistyfeline on linuxquestions.org here is a link to the original post http://www.linuxquestions.org/questions/linux-software-2/cant-log-in-with-hamachi.-409344/)

Rename the original tuncfg file in that folder (only if you need to):

mv tuncfg tuncfg.backup

Use your choice of text editor to edit the tuncfg.c file. Search for the piece of code that has ifconfig. There is only one instance of that.

Change:

"ifconfig %s %u.%u.%u.%u ", ctx[i].dev,
TO
"/sbin/ifconfig %s %u.%u.%u.%u ", ctx[i].dev,

Then:

gcc tuncfg.c -o tuncfg

That recompiles tuncfg to incorporate the changes you made. Next, if you had already started tuncfg, kill all instances of tuncfg with:

killall tuncfg

Next, run the following as root to install the new tuncfg:

make install
/sbin/tuncfg

Finally, run "hamachi start" as a regular user and you may proceed as indicated in the README file.

 

3 Install & start Hamachi

Per the README file, install hamachi as a regular user by running hamachi-init:

hamachi-init

Initializing Hamachi configuration (/home/aru/.hamachi). Please wait ..

generating 2048-bit RSA keypair .. ok
making /home/aru/.hamachi directory .. ok
saving /home/aru/.hamachi/client.pub .. ok

hamachi start

Starting Hamachi hamachi-lnx-0.9.9.9-20 .. ok

 

4 Configure Hamachi

Once you are able to start Hamachi, you can then proceed to configure it to join a network:

# join "networkname" "networkpassword"

If no command is specified, hamachi displays its status including version, pid, online status and the nickname. Or you can get a list of commands by typing:

hamachi help

Once you’ve created or joined a network you can set up hamachi to start on boot by editing the rc.local file:

sudo vi /etc/rc.local

  /sbin/tuncfg    su - user -c "hamachi start"

 

Or you can set up Hamachi as a service by using a init.d script like the one described in the blog here by cannin: http://idahospuds.blogspot.com/2006/03/scitech-hamachi-as-service-in-fedora.html

  
#!/bin/bash
#
# hamachi         This shell script takes care of starting and stopping
#                 hamachi.
#
# chkconfig: 345 99 9
# description: hamachi is a zero-configuration VPN
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
[ -f /etc/hamachi/client.pri ]  exit 0
[ -f /etc/hamachi/client.pub ]  exit 0
[ -f /usr/bin/hamachi ]  exit 0
# See how we were called.
case "$1" in
start)
 echo "Starting hamachi..."
 /sbin/tuncfg
 /usr/bin/hamachi -c /etc/hamachi start
 ;;
stop)
 echo "Stopping hamachi..."
 killall tuncfg
 /usr/bin/hamachi -c /etc/hamachi stop
 ;;
restart)
 stop
 sleep 1
 start
 ;;
  *)
 echo "Usage: hamachi {startstoprestart}\n"
 exit 1
esac
exit 0

(I actually just went with the rc.local commands as I found that as long as I leave my server running most of the time my need for a service isn’t all that great. I just needed it to startup when there is a power outage.)

Make sure to verify that both tuncfg and hamachi are running afterwards by doing a ps:

ps -ef | grep tuncfg
ps -ef | grep hamachi

Now you can access your server from anywhere you are able to install a hamachi client from. If you want a GUI interface, you can also look into installing one from the links below.

 

5 Links

 

Create BlackBerry applications with open source tools

Frank Ableson (fableson@msiservices.com), Software designer

There is perhaps no bigger market-transformational technology than the cell phone. And within that classification of devices, perhaps none more recognizable than the BlackBerry from Research In Motion (RIM). Most people think it is just for business e-mail, but there is untapped potential in that addictive device. Despite being a popular platform, third-party applications are still needed for the BlackBerry platform. There is no better way to bring those applications to fruition than to enable the help from the open source community. Follow along as this tutorial lays the groundwork for an open source data-collection application, upon which an accessible and easy-to-use data-collection service is built.

In this tutorial

This tutorial is for Web developers who are looking to create Web applications that run on the desktop seamlessly. Familiarity with Web development technologies, such as HTML, CSS, and JavaScript, are required to follow along. Although not required, experience with the Ext framework would be helpful.

Objectives

This tutorial introduces BlackBerry application development within the context of the mobile data-collection application space. It provides an introduction to BlackBerry development with a quick introduction to the platform, a tour of the BlackBerry development tools, and construction of a complete data-collection application. Complete source code is available for the BlackBerry application and the server-side components used in the sample application. This tutorial is organized into the following sections:

  • BlackBerry platform basics

  • BlackBerry application development with JDE
  • Data-collection applications with BlackBerry
  • Transaction processing on the server side
  • Next steps

Prerequisites

See System requirements

System requirements

This tutorial demonstrates a few open source technologies and stitches them together to form a prototype for an open source mobile data-collection platform. You need all of them to perform the steps in this tutorial. Our primary focus is developing applications for the BlackBerry platform, so those pieces are the primary requirement. You can leverage a publicly available Web site for server-side transactions if building out the server side is not of interest to you. Here’s the full list:

BlackBerry Java Development Environment This tutorial employs V4.0.2 of the JDE, although a later version is available.
PHP PHP may be downloaded from PHP.net. The latest stable release is V4.4.9.
MySQL The latest stable release is V5.0.
IBM Tutorial on BlackBerry Data Collection Applications Access the author’s site hosting the server-side transactions.

Get free blog up and running in minutes with Blogsome | Theme designs available here