Hamachi install on DS209

All discussions/development regarding the Marvell mv6281 Chip can be placed here.
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
gordon8452
Beginner
Beginner
Posts: 21
Joined: Sun Nov 21, 2010 4:46 pm

Hamachi install on DS209

Unread post by gordon8452 » Tue Nov 23, 2010 12:00 am

Here are the steps I used to get Hamachi running on my DS209 (currently running DSM 3.0):
Note: this info was gathered from various places around the net, I'm just sticking it here for ease of reading, and from doing my own hamachi install. I do not take credit.

Step 1: Enable SSH from web gui.
Step 2: Login to ssh with root
Step 3: Install IPKG, I did a wget http://ipkg.nslu2-linux.org/feeds/optwa ... -7_arm.xsh
Step 4: Install openssl with ipkg install openssl
Step 5: Grab the arm build of hamachi linux with wget http://files.hamachi.cc/linux/nokia-770 ... 770.tar.gz
Step 6: Unpack hamachi installer with tar -xvfz hamachi-0.9.9.9-20-lnx-n770.tar.gz and go into the hamachi installer directory
Step 7: Run ./install
Step 8: ln -s /opt/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.0.9.7
Step 9: run tuncfg
Step 10: check to see if tun is loaded with a lsmod | grep tun, if not run insmod /lib/modules/tun.ko
Step 11: run hamachi-init for first time setup
Step 12: run hamachi start
Step 13: run hamachi set-nick Diskstation hamachi nick here
Step 14: run hamachi login
Step 15: run hamachi join Your hamachi network name
Step 16: run hamachi go-online Your hamachi network name You should now see your diskstation listed in the hamachi clients windows on your pc.
Step 17: run echo "KeepAlive 10" >> ~/.hamachi/config this creates a config file with a keepalive value so that you're connection doesn't time out with the hamachi2 networks
Step 18: put a script in folder /usr/syno/etc/rc.d/ to make hamachi run at startup. I have named mine S99hamachi.sh with chmod 0755 permissions, and posted it below:

Code: Select all

#!/bin/sh
# Make sure the tunnel driver is loaded
if ( !(lsmod | grep -q "^tun") ); then
        insmod /lib/modules/tun.ko
fi

hamachi_start() {
        echo "Starting hamachi..."
        /sbin/tuncfg
        /usr/bin/hamachi start
        /bin/chmod 760 /var/run/tuncfg.sock
}

hamachi_stop() {
        echo "Stopping hamachi..."
        killall tuncfg
        /usr/bin/hamachi stop
}

hamachi_restart() {
        hamachi_stop
        sleep 1
        hamachi_start
}

case "$1" in
'start')
        hamachi_start
        ;;
'stop')
        hamachi_stop
        ;;
'restart')
        hamachi_restart
        ;;
*)
        hamachi_start
esac

FPL
I'm New!
I'm New!
Posts: 2
Joined: Tue Dec 07, 2010 1:16 am

Re: Hamachi install on DS209

Unread post by FPL » Tue Dec 07, 2010 1:27 am

This is really interesting...
BTW, I have a question for you and I hope you can help. I have the same setup (DS209 and DSM 3.0) and I followed your guide: everything works ok except for the auto-startup...when I reboot my system it looks like I have to manually startup hamachi via ssh. Do I forget something at step 18?

Thanks in advance!

FPL
I'm New!
I'm New!
Posts: 2
Joined: Tue Dec 07, 2010 1:16 am

Re: Hamachi install on DS209

Unread post by FPL » Tue Dec 07, 2010 11:18 am

Ok,I got it...I guess I had to sleep over it a bit!

I changed this part of your script:

Code: Select all

hamachi_start() {
        echo "Starting hamachi..."
        /sbin/tuncfg
        /usr/bin/hamachi start
        /bin/chmod 760 /var/run/tuncfg.sock
with this (second last line):

Code: Select all

hamachi_start() {
        echo "Starting hamachi..."
        /sbin/tuncfg
        /usr/bin/hamachi -c /root/.hamachi start
        /bin/chmod 760 /var/run/tuncfg.sock
Now it looks flawless!

gordon8452
Beginner
Beginner
Posts: 21
Joined: Sun Nov 21, 2010 4:46 pm

Re: Hamachi install on DS209

Unread post by gordon8452 » Wed Dec 08, 2010 10:58 pm

Glad you got it working. The -c is just to specify config file location, though you can use it in the setup phase as well. If you are going to use the -c, it's probably best to stick the config folder into /etc and call it from there, as long as we're trying to be proper. The script can be modified several ways, you could generate a pid file, and determine whether the service is running based on that also. As long as it works for ya.

I'm also going to try looking into bridging eth0 and ham0 here at some point, I know openvpn does this sort of thing and I'd like to try something similar as the dlna service only outputs on 1 interface and i'd like to have it going out on both eth0 and hamachi. Right now I have mediatomb set up as a secondary dlna server just going out on my hamachi network and offering up the same content as the regular one, but I'd like to arrange to not have to do this.

SGR16442
I'm New!
I'm New!
Posts: 1
Joined: Sat Jan 08, 2011 6:07 pm

Re: Hamachi install on DS209

Unread post by SGR16442 » Tue Jan 11, 2011 11:54 pm

I am not having the same luck on my CS407 with DSM 3.0-1354. Everything seemed work ok up to step 9. Trying to run tuncfg gets me "-ash: tuncfg: not found".
grep showed nothing so I executed insmod /lib/modules/tun.ko and then grep showed it running. But I had the same lack of luck with steps 11 and 12, getting not found on those commands. I installed and ran everything logged in as root.

Is it because the CS407 has a different processor than the CS209? Any assistance would be appreciated.

Thanks,

-Steve

echelon6
Rookie
Rookie
Posts: 39
Joined: Wed Mar 10, 2010 11:21 pm

Re: Hamachi install on DS209

Unread post by echelon6 » Sat Jan 22, 2011 3:07 pm

Hi there

Thank you very much for the tutorial - I followed this and got hamachi installed successfully on my DS210J

But I got stuck at a later stage. When I connect my DS210j to a mesh network started by my home desktop running Win7, I would get a green light next to the DS210j in the Hamachi window. After a minute or two, I would get a yellow exclamation mark, before the green light starts blinking. The green light next to the network remains solid however.

I can't browse files when I right click the DS210j and select Browse. I get the popup window saying "Windows cannot access \\<ip address> ". If I reconnect my desktop to the network, I would regain the green light bext to my DS210j momentarily, but after a minute or two, it would start blinking again following the yellow exclamation mark.

During the solid green light of the DS210j, it can be pinged. But it can't be browsed.

Weird thing #1: The weird thing is, the very first time I set this up, Browse WORKED - there's login credentials required so I entered them and was able to browse my network like it was a network drive, which is what I want. However, this session disconnected by itself after a few minutes and I've since been unable to get Browse to work again.

Weird thing #2: when I PING the DS210j during the solid green light, it pings repeatedly. If I leave the ping on, the green light stays solid indefinitely! But still, I can't browse files even during the solid green light. I get the same popup "Windows cannot access \\<ip address>

On my computer I've also tried typing into run: \\<hamachi ip address> but I get the same popup "Windows cannot access \\<ip address>

Any suggestions? I am so close to my goal!!!

echelon6
Rookie
Rookie
Posts: 39
Joined: Wed Mar 10, 2010 11:21 pm

Re: Hamachi install on DS209

Unread post by echelon6 » Mon Jan 24, 2011 3:04 am

All sorted

Was a keepalive issue

arctan
Trainee
Trainee
Posts: 12
Joined: Tue Jan 25, 2011 6:07 am

Re: Hamachi install on DS209

Unread post by arctan » Tue Jan 25, 2011 6:43 am

This is great! I got it working on a DS209 which is still running DSM2.3. I previously had setup openvpn on it, but really wanted hamachi. Thanks gordon8452!

If I signup for a paid Hamachi2 account, is there any way to add the new DS209 hamachi v1-based client to that account to: 1) take advantage of the faster relays and/or 2) participate in hub-and-spoke networks?

echelon6
Rookie
Rookie
Posts: 39
Joined: Wed Mar 10, 2010 11:21 pm

Re: Hamachi install on DS209

Unread post by echelon6 » Thu Feb 10, 2011 3:10 am

After getting this working perfectly, my webstation, photo and blog stopped working. Webstation redirects to port 5000 (admin login page) as soon as I point the browser to it. The other two return a php error. Anyone else experiencing this loss of functionality after getting hamachi working?

gordon8452
Beginner
Beginner
Posts: 21
Joined: Sun Nov 21, 2010 4:46 pm

Re: Hamachi install on DS209

Unread post by gordon8452 » Thu Feb 10, 2011 5:08 pm

I haven't experienced any loss of functionality issues with my install, everything is working fine. As far as the hub/spoke and other paid features I don't think there is any way to get those working with this build as it is the older hamachi v1 protocol and i don't think those setup's were supported, or if they were in v1, not in the linux package, which is very basic. Honestly I am happy that v2 provides the ability for legacy v1 connections to work at all.

XBMC_2
Novice
Novice
Posts: 43
Joined: Mon Jan 26, 2009 10:21 pm

Re: Hamachi install on DS209

Unread post by XBMC_2 » Sat Feb 19, 2011 6:19 pm

SGR16442 wrote:I am not having the same luck on my CS407 with DSM 3.0-1354. Everything seemed work ok up to step 9. Trying to run tuncfg gets me "-ash: tuncfg: not found".
grep showed nothing so I executed insmod /lib/modules/tun.ko and then grep showed it running. But I had the same lack of luck with steps 11 and 12, getting not found on those commands. I installed and ran everything logged in as root.

Is it because the CS407 has a different processor than the CS209? Any assistance would be appreciated.

Thanks,

-Steve
same with me...............anything on that??

gordon8452
Beginner
Beginner
Posts: 21
Joined: Sun Nov 21, 2010 4:46 pm

Re: Hamachi install on DS209

Unread post by gordon8452 » Wed Feb 23, 2011 8:29 pm

Maybe.
Since your machine uses an mv5281 and not a 6281, make sure your optware you are getting is from the right feed:
http://ipkg.nslu2-linux.org/feeds/optwa ... /unstable/
as opposed to the one listed in step 3. Install the tun module from there.

If not you could always try this one, but I think it is for an older kernel:
http://blog.deadcode.net/uploads/tun-0944-mv5281.zip

isabellafreedman
I'm New!
I'm New!
Posts: 2
Joined: Sun Jun 19, 2011 2:19 am

Re: Hamachi install on DS209

Unread post by isabellafreedman » Sun Jun 19, 2011 2:24 am

I went for the mv5281 version for my RS407. Then I found there was a missing step 3.5 to install ipkg with sh before installing openssl with ipkg. I referenced a Synology wiki to find out how to do that. Now, however, I'm stuck at step 9 as my unit doesn't recognize the run command. How do I run tuncfg without it?

gordon8452
Beginner
Beginner
Posts: 21
Joined: Sun Nov 21, 2010 4:46 pm

Re: Hamachi install on DS209

Unread post by gordon8452 » Tue Nov 01, 2011 6:12 pm

Has anyone yet tried to use the updated hamachi2 arm build located here?
https://secure.logmein.com/labs/

I am going to be trying to get this setup on my DS209 but I wanted to ask if anyone else has gotten it working first.

gordon8452
Beginner
Beginner
Posts: 21
Joined: Sun Nov 21, 2010 4:46 pm

Re: Hamachi install on DS209

Unread post by gordon8452 » Wed Nov 02, 2011 3:24 am

I've successfully setup and gotten hamachi2 arm beta running on my DS209. I am in the process of noting what was necessary to set it up so that I can formally post instructions here. It is significantly more involved than setting up the older arm port via the fact that is requires LSB package. Ipkg does not have lsb-core and I did not cross compile it, instead going with a more currently documented route of setting up a debian chroot and using apt-get. More notes later.

Post Reply

Return to “Marvell mv6281 Development Room”