netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Support for a FreeBSD as a client OS

Open yaroslav-gwit opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. First of all - thank you for this beautiful project and all your hard work! I wanted to introduce NetBird as a way to allow remote users access our FreeBSD virtualisation nodes.

FreeBSD bhyve VMs and FreeBSD Jails are using the private bridges (bridges that are not connected to any external interface) as internal networks and then the host node uses PF to orchestrate all the network traffic (NAT, VM-to-VM access, etc).

It's an SDN-like solution, which leverages site-to-site WG links for host-to-host communications (and all the internal route management), but it's very tedious to use the "naked" WG for every remote user (or client device) that wants to access our cluster(s).

We are using ZeroTier as of now to onboard the remote users/client devices, but I am not happy with their business licencing terms (I am a paid customer, using their Pro plan), as they are trying to convert all the Pro users to the Custom Enterprise Plan - Link to the Reddit discussion for those interested. I am also not happy with how ZT works under FreeBSD, but that's a whole another story on it's own.

Describe the solution you'd like The NetBird installation script didn't work for the FreeBSD (nor that I expected it to, because the OS is not on the "supported" list, but it doesn't hurt to try), and I could not find any build instructions to compile the client manually (could be just me skimming thought the repo and missing the build/make script).

Ideally, I'd like to see the NetBird deployment script include an automatic deployment options for FreeBSD, but it will likely take a long time to implement. For now I tried to compile the client like so (but the build has failed):

git clone ${NetBird_Repo}
cd netbird/client
go121 build

Here is output:

# github.com/netbirdio/netbird/client/ssh
ssh/server.go:193:5: undefined: setWinSize
# github.com/netbirdio/netbird/client/internal/dns
internal/dns/server.go:149:25: s.initialize undefined (type *DefaultServer has no field or method initialize, but does have Initialize)

Describe alternatives you've considered As an alternative, I tried using a Linux VM running under the FreeBSD to deploy the service and distribute the routes. It works well, but far from ideal - it's harder to automate PF around this process, and we lose the autostart if the VM is running on top of the encrypted ZFS dataset (it becomes a manual process to unlock the dataset first, and then start the VM).

Additional context I am happy to provide any additional context on request.

yaroslav-gwit avatar Jan 29 '24 15:01 yaroslav-gwit