monotux.tech

ZeroTier on FreeBSD 14

FreeBSD, networking, ZeroTier

I recently built a new machine and installed FreeBSD 14 and ZeroTier on it, due to reasons.

However, when I tried to join a ZT network I just got HTTP 401 back on any command I tried.

# zerotier-cli info
401 info{}
# zerotier-cli peers
401 peers {}

It seems that FreeBSD has changed a default, and returns a IPv6 address (ffff:127.0.0.1, and not 127.0.0.1 or ::1 as expected) when asked what address a socket is running? Not sure I really understand :-D

The solution is simple. Write the following (or append) to your /var/db/zerotier-one/local.conf:

{
  "settings": {
    "allowManagementFrom": [
      "127.0.0.1",
      "::1",
      "ffff:127.0.0.1"
    ]
  }
}

This will allow management from this new address as well. I’ve seen examples which also includes 10.0.0.0/8 but that is just wrong unless you really know what that will do.

One thread where I found this workaround in is on the ZeroTier community forums.