PDA

View Full Version : Trying to get Hamachi to work


ArtemD
November 23rd, 2008, 18:13
Hello there fellow FreeBSD sysadmins

I have been trying to get Hamachi (https://secure.logmein.com/products/hamachi/vpn.asp) to work under FreeBSD 7.1-BETA2 (tried in 7.0 stable too) and all I get is this error when trying to run "hamachi start":
23 19:04:13.333 [ 0] [20611] tap: recvmsg() failed 22

After this error hamachi-tuncfg dies.

If anyone knows a solution to this I (and I assume many others) would be grateful :)

Levenson
November 23rd, 2008, 18:22
First of all you should do this

Run '/usr/local/etc/rc.d/hamachi forcestart' from under the root account
Run 'hamachi-init' to generate crypto identity (any account).
Run 'hamachi start' to launch Hamachi daemon.
Run 'hamachi login' to put the daemon online and to create an account.
Run 'hamachi join <network>' to join the network.
Run 'hamachi go-online <network>' to go online in the network.
Run 'hamachi list' to list network members and their status.

here is more (http://logmeinwiki.com/wiki/Hamachi:Install_on_FreeBSD) info

ArtemD
November 24th, 2008, 08:21
Hi and thnx for the reply

I need to apologize for not mentioning that I followed the same steps you listed. Error occurs after I've done first 2 steps and try to do "hamachi start".

Mel_Flynn
November 24th, 2008, 10:18
Hi, not familiar with the software in question, but recvmsg doesn't set EINVAL (errno 22). getsockopt(2) does, when:
[EINVAL] Installing an accept_filter(9) on a non-listening
socket was attempted.

Does this make sense in the software context and possibly with your use of the accf_http module?

ArtemD
November 25th, 2008, 09:36
I tried disabling accf_http and it didn't help :(

SirDice
November 25th, 2008, 11:42
Is the if_tap kernel module loaded? Check with kldstat and ifconfig.

ArtemD
November 25th, 2008, 13:17
Hello

if_tap.ko is loaded and tap0 device exists...and still hamachi gives the same error.

nixcamic
February 5th, 2009, 06:27
I realize I'm resurrecting a really old thread here, but did you ever get this fixed? I'm having the same problem.

swmspam
February 20th, 2009, 17:02
Wow, I'm a serious BSD n00b. My expertise is with Debian. I have several machines set up with intercompatibility with OSX, Debian, and Windows. However, I recently moved a lot of files to a new FreeNAS box, based on FreeBSD. I am currently trying to network it into my Hamachi network.

I ran kldstat to check dependencies. As expected (FreeNAS is a minimalist installation), linux.ko and if_tap.ko are not installed.

So I run
pkg_add -r linux-libgcc
and get a "File unavailable (e.g., file not found, no access". I browse ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.4-release/Latest/ and see that linux-libgcc is not available.

So now I try to install Hamachi and have FreeBSD solve the dependencies:
freenas:/#pkg_add -r linux-hamachi
Fetching ftp://ftp.freebsd.org/.../linux-hamachi.tbz... Done.
Fetching ftp://ftp.freebsd.org/.../linux_base-fc-4_13.tbz... Done.
Linux mode is not enabled.
Loading linux kernel module now...
kldload: can't load linux: No such file or directory
The linux kernel module could not be loaded.
Please enable linux mode manually and retry.
pkg_add: install script returned error status
pkg_add: pkg_add of dependency 'linux_base-fc-4_13' failed!

I can't even get started ... past the first step! What a n00b. Any suggestions to get me going?

MissileSilo
February 26th, 2009, 17:17
I think you can't install this software on the amd64 version of FreeBSD. I tried installing it on FreeBSD 7.1 amd64 and got this error after I typed "hamachi start":

http://i41.tinypic.com/2v0bfpl.png

ArtemD
February 26th, 2009, 19:19
Hi

I found this advice for getting Hamachi to work on FreeBSD. It was originally posted by Steven Borrelli on Facebook:

I got it running, after many tries (and failures).

I'm using a minimal installation of FreeBSD 7.0. It's been a while since I dealt with the hamachi. I think i tried compiling it from the ports collection but the program didn't work, so I had to grab the hamachi OSX version of tuncfg. Specifically, I got hamachi-0.9.9.9-15-osx.tar.gz, copied tuncfg/tuncfg to /sbin/tuncfg, and I believe it worked just fine after that. So, here's my hamachi config script that I run at startup:

kldload if_tap
/sbin/tuncfg
kldload if_bridge
ifconfig bridge0 create
ifconfig bridge0 addm fxp0 addm tap0
ifconfig bridge0 up
hamachi start

I haven't tried it myself yet thou.

Best regards,
Artem

MissileSilo
February 26th, 2009, 21:33
/sbin/tuncfg: Exec format error. Binary file not executable.

swmspam
February 27th, 2009, 14:53
My problem is having all the right dependencies to compile tun. I can't get the "make" command to work. See http://apps.sourceforge.net/phpbb/freenas/viewtopic.php?f=23&t=617&sid=b8a5b612a2470352d3ab309fc2bf5491

chalbersma
July 5th, 2009, 05:41
So here's what I did.

Added the ucl package because my network thought that it was a worm of some sort. Life on a college campus eh?


$ sudo pkg_add -r ucl


Install hamachi


$ cd /usr/ports/security/hamachi
$ sudo make install



$ sudo /usr/local/etc/rc.d/hamachi forcestart
$ cd
$ hamachi-init
$ hamachi join <Network>
Password:


and I'm running

Good luck

MissileSilo
July 6th, 2009, 17:06
So here's what I did.

Added the ucl package because my network thought that it was a worm of some sort. Life on a college campus eh?


$ sudo pkg_add -r ucl


Install hamachi


$ cd /usr/ports/security/hamachi
$ sudo make install



$ sudo /usr/local/etc/rc.d/hamachi forcestart
$ cd
$ hamachi-init
$ hamachi join <Network>
Password:


and I'm running

Good luck

[root@freebsd64b72 /usr/ports/security/hamachi]# hamachi start
ELF binary type "0" not known.
su: /usr/local/bin/hamachi: cannot execute binary file

chalbersma
July 7th, 2009, 20:02
Is your Linux compat turned on?

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html