Zerotier? how is this configured?

syadnom

Cadet
Joined
Mar 6, 2014
Messages
3
I can't find anything on how to configure zerotier in FreeNAS 11, though it says it's been added in the changelog.
 
Last edited by a moderator:
D

dlavigne

Guest
Right now it's just available from Shell until it has undergone further testing. If you try it out, please post your feedback (how you set it up, if you found any bugs, etc.).
 

syadnom

Cadet
Joined
Mar 6, 2014
Messages
3
ok, I was hoping it was in the UI, otherwise it's easy to forget about a configuration when you manage a bunch of systems.

Ok, so functionality is pretty simple.


1) zerotier-cli join my16digitnetworkname
2) log into my.zerotier.com and authorize the device.

there are some caveats here.

If you've added your network interface in the FreeNAS GUI, you cannot browse smb shares via the zerotier config unless you also add that interface. You can only have one DHCP interface so you must have a static IP on FreeNAS. I typically do a sticky dynamic IP address so this is a bit of a pain. If you haven't added any interfaces in the gui, then it works fine. One workaround if you do have a DHCP LAN interface is to set it to static temporarily, get zerotier up and running and find out your IP address on the zerotier network. Then set the zerotier interface to static with that IP. Now you can put your LAN back on DHCP.

Performance is pretty decent.
When transferring on the same physical gigabit network I get 100Mbps to an SMB share. On that same network but over the zerotier interfaces it's about 30Mbps.

both windows PC and FreeNAS are i5-2400 and zerotier is hitting 1 core at about 45% on FreeNAS, 35% on Windows 10. I'm not sure where the bottleneck is limiting it to 30Mbps considering there is some CPU to spare even on a single core but 30Mbps is definitely usable.

Transferring across a WAN link I'm getting about 24Mbps *BUT* the remote side has a Core2 2.4Ghz and the CPU is 100%. Connections are 100x100Mbps and 60x5. The reverse is maxing the 5Mbps upload.

Basically, this is CPU bound, so set expectations for transfers for a single core of your CPU and then GHz and generation of CPU.

I have experienced some Windows client issues with zerotier, but the FreeNAS client and the Linux clients I have running seem rock solid.
 
Last edited by a moderator:

AYouden

Cadet
Joined
Nov 24, 2016
Messages
1
Hello,

I was wondering if you could help me out?

I'm trying to set ZeroTier up on my FreeNAS to avoid the firewall of my router.

I have used the most recent Nightly build of FreeNAS 11 and attempted the "zerotier-cli join my16digitnetworkname" as suggested.

This brought up an error saying that no port was found.

Is there a set-up or start command which I'm missing out before I do the join command?

Any help would be greatly received!

Thanks,

Alex
 

petitbas

Cadet
Joined
Jan 28, 2018
Messages
3
I'm running a clean install of FreeNAS-11.1-U1 and zerotier doesn't autostart. Any pointers on how to fix that?
 

JOduMonT

Dabbler
Joined
Jan 27, 2015
Messages
29
@petitbas

when you install zerotier on OPNsense which is also based on FreeBSD
it make it start via this RC script : /etc/rc.conf.d/zerotier

which contain theses 2lines :

zerotier_enable="YES"
zerotier_var_mfs="/var/db/zerotier-one"

but FreeNAS will erase your your /etc/rc.conf.d/zerotier as well than is configuration in /var/db/zerotier-one

Code:
#!/bin/bash -eux

ln -s $( cd "$(dirname "$0")" ; pwd -P )/zerotier-one /var/db/zerotier-one
/usr/local/sbin/zerotier-one -d
/usr/local/bin/zerotier-cli join NETWORK-ID


of course the configuration (/var/db/zerotier-one) must be populated before you could join your NETWORK
so
Step 1 :
run the script

Step 2 :
add you zt interface

Step 3
rerun the script
 
Last edited:

JOduMonT

Dabbler
Joined
Jan 27, 2015
Messages
29
@AYouden

After running zerotier-one -d and zerotier-cli join
you have to add a new interface which will be virtual and start with zt
It's also possible to do this via the WebUI (Network -> Interface -> Add Interface)

so simply add the interface in DHCP mode
 
Last edited:

petoniano

Dabbler
Joined
Feb 14, 2018
Messages
29
I have to join the network everytime the Freenas system is restarted, I still don't know how to autostart the service.

@AYouden

so simply add the interface in DHCP mode
If I add de Network interface in DHCP mode it doesn't work for me, I have to set the IPv4 with the ip that the zerotier network gave me for that client. And only works if the clients are in the same physical network as I explain here:

https://forums.freenas.org/index.ph...ly-working-on-physical-lan.63862/#post-458651

probably bad configuration on my side but I don't know how to fix it, I hope it comes within the GUI in furure builds.
Anyone has Zerotier working without issues?

thank you
 
Joined
Oct 3, 2015
Messages
1
Granted I wasn't searching particularly hard, but I couldn't find other threads that covered this and this was the first thing that pops up on Google, so I figured I'd leave how I got it to work here for others to find. This should work on FreeNAS 11.

Make a script containing this (changing the /path/to/folder and fake join ID obviously) and run it in Tasks > Init/Shutdown Scripts as post-init. (I run it as a command: "bash /path/to/script/myscript.sh".)
Code:
#!/bin/bash

ln -s /path/to/folder/zerotier-one /var/db/zerotier-one
/usr/local/sbin/zerotier-one -d
sleep 1
/usr/local/bin/zerotier-cli join 1234567890abcdef

Basically, configuration gets reset upon reboot, so you have to make a symbolic link at /var/db/zerotier-one so it places all the files elsewhere, and then remake it every startup so Zerotier finds the files it needs to find when you run it again.

The sleep 1 is there because if you run the zerotier-cli command immediately afterward, it is not ready yet for some reason. Guess it needs a moment to wake up. #justlikeus
 
Last edited by a moderator:
Joined
Dec 25, 2019
Messages
6
I am able to access the FreeNAS WebGUI from the ZeroTier IP, but cannot access any of my network shares. How do I set it up so that I can access any of my shares outside my house when connected to ZeroTier?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
Under Services | SMB (click the pencil to edit) then see Bind IP Addresses in the GUI, you will see the drop-down to enable SMB sharing for each of your IPs... your zerotier IP should be there, make sure it's ticked.
 
Joined
Dec 25, 2019
Messages
6
Under Services | SMB (click the pencil to edit) then see Bind IP Addresses in the GUI, you will see the drop-down to enable SMB sharing for each of your IPs... your zerotier IP should be there, make sure it's ticked.
Thank you. When I type in the zerotier IP followed by the storage folder, it pops up the login screen but then when I type in the same credentials I use when accessing it regularly, it says it can no longer access it.

1577383653291.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
What type of security are you using? if it's domain based, you will also need access on zerotier to a domain controller.
 
Top