-
-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Route to FreeBSD client #2200
Comments
Really Cool, @moserpjm. Would you share the port and the code changes you've done? We plan to add support to PFsense and OPNSense soon, but we are a bit short on capacity and any community help is welcome. |
Due to the fact that we're a JVM shop I'm not an expert on BSD ports. :D |
@moserpjm you can give access to [email protected] and from there I can fork it. |
I'll cleanup the code a little bit, push it to GitHub and then invite you. |
I've forked the repos on GH and added my changes. Netbird port Build instruction: OPNSense plugin Build instruction: |
Great to see the community getting involved and being able to contribute towards this! |
@moserpjm thanks for this, built and tested on pfsense arm and opnsense x86-64, works on both, including egress. |
@robdeweese great to hear. |
Is there an OPNSense repo I can use to install these? I'd love to test them out. |
I've put the packages ive built here https://nhd.cx/w6we3 but I only build the client, not the web interface. They will run on pfsense and opnsense but they are very easy to build yourself as well, @moserpjm provided instructions above |
Just some quick updates: I found out hat OPNSense is maintaining a fork of the freebsd-ports repo with tags of all releases in it. So I've rebased on that. There are new patches included:
It would be really nice to have environment variables for those settings in netbird to get rid of the patches. The plugin now has some new features:
My current working branch is "new-status". We're currently testing it with our firewalls at the office. A repo for internal use is already in place. I'll try to get a cheap VPS to let you try my builds. |
If you're brave enough you can try the build in my RC repo.
|
I've uploaded 0.28.5 builds to the PR repo. I've also restructured the repos. There are now development branches for OS 24.1 and 24.7 in both repos. For future builds I'll tag them in GIT with the port/plugin version. 24.7 versions work fine on the latest R2. |
@moserpjm
I think I do have some glitches in my config. This plugin seems to work without any problem and the problems came (unexpected) out of my system. |
@Hobby-Student nice to hear that it works for you. |
with the netbird port wt0 is added to the system and we enable the netbird interface within opnsense. For me it looks like you then need to manage the firewall rules for the netbird interface. If netbird would add routes in the background, those routes wouldn't affect opnsense in a negative way? As far as I can see, tailscale is doing it the same way. Just doing stuff in background and opnsense can handle this through firewall rules on the interface. I'll do some tests. |
Yes you have to manage the rules on your own. If you configure a network route via a node in Netbird firewall rules don't apply anyway. Don't get me wrong but no sane sysadmin would trust the firewall mechanism of some third party VPN tool on a firewall. Client maybe but not on a firewall. |
I agree, but I want to give the possibility a chance and take a look at how things are handled this way. I did try tailscale the other day and I think they use this approach. Of course, I could be totally wrong 😄 |
little Update: Is netbird client not able to use the routes because it's not implemented for FreeBSD and therefore static routes are not working? |
Pro tip #1: Don't mess around with the shell. OPNsense has it's own configuration system. If you fiddle around with the CLI it will end in some undefined state. I'd reboot it first before you do anything else. I haven't tried what you try to accomplish myself so this is just a lucky guess. |
I tried it first through the web UI. It failed. Then I did what wireguard does (or how I think it does), just add the route on the interface without a gateway. Perhaps I missed something and I will try again as soon as possible. |
Mystery solved (perhaps): @mlsmaycon |
removed netbird from opnsense, rebooted, deleted the peer in netbird management, compiled netbird v0.28.7 and just used the mod by @moserpjm to identify the FreeBSD as linux -> It works! I'll test this some more and report back. |
Deployed it on 3 opnsense boxes and configured routes via netbird management. Every firewall rule inside OPNsense is respected and withtout any rule on netbird interface, traffic is blocked (default). |
It seems to be some progress with the latest version. |
@ditronicos the limitation on the management server regarding the Network routes seems to be still there. Let' s hope for 0.37.0 |
A quick message from me. A Netbird integration in OPNsense is incredibly useful :-) |
For the record: opnsense 25.1 has been released. 24.7 can be easily upgraded from the UI. https://opnsense.org/about/road-map/ The plugin still working fine. Just after the last upgrade reboot, the ping to the rest of the netbird network was a bit large, it connects relayed. Shutting down the VM (i have installed opnsense in proxmox) and it connects p2p again. Some minors aesthetics issues in the connection status page related with the search button, not a big deal (cicada theme). |
Hey everyone, I created 2 pull requests for OPNsense:
Fingers crossed, that the OPNsense team is happy with it. |
Yep, all the fingers. |
You are simply the best. They are clever people at Opnsense, they give their ok |
@Gauss23 thanks for your work. I use my own compiled version on several opnsense boxes. I would have waited with the pull requests until netbird merged all changes for FreeBSD. Now it's "netbird with custom patches, which make it work, but there could be unwanted side effects in regards of routing security and netbird will soon merge changes in routing for FreeBSD". |
@Hobby-Student the only part of the patch which is left, is the reporting as FakeBSD. DNS and Routing patches were removed replaced by the built-in functions. So, yes, as soon as the Netbird Management server accepts all peers as routing peers, this patch can also be removed. |
just my 2 cents. OPNsense is trying to keep everything secure to not damage its reputation. New VPN plugin with workarounds seems not to be the best idea. |
I hope they accept the PR. |
Hi, I've installed netbird on my OPNSense with this repo:
|
Hi @IceFlom, thanks for bringing that up. It seems that I missed to clean up the repo. There were multiple versions and there therefore it complained. Now it's fixed. The repo is 24.7. I need to create one for 25.1. Hope to do this this weekend. The misconfigured seems to be normal for all 3rd party plugins. At least that's what I understood in the answer of the OPNsense team: It was noted as misconfigured also in 24.7.x |
Hi guys, 0.37.0 is finally here. |
Thank you for the heads up. From reading the release notes I can't see that the limitation for Linux a routing peer was removed. Maybe someone else can comment on that. |
It was released with |
Thank you. Are there any plans to remove the management UI restriction? |
There's never been one, only a dashboard limitation. It has been lifted as well |
Perfect, turns out I just pulled the new docker images but forgot to restart the containers. Now it works as expected. That's great! Thank you! And then the OPNsense plugin can be released. |
this is excellent news! i look forward to the plugin being released. |
It there any workaround to assignee it as routing peer mine still has empty Linux version. Thanks |
Hey Folks, As you know, we've submitted our FreeBSD port for NetBird but haven’t received any response from the FreeBSD team yet. We’d really appreciate it if you could leave a comment on the issue. Your support can help bring more attention to the submission and speed up the review process. Here’s the link to the issue: Bugzilla Thanks for your support! Every comment helps! |
Waiting for the creation of my account there to be able to add a comment. |
+1 |
It does not looks like this is going forward form the FreeBSD side. Any alternative solution? |
I‘m also frustrated about the whole process. It’s seems to be very erratic. No queue where we would see how long it might take. OPNsense folks say that the port is needed for the plugin. |
May be it will be easiest to try with pfsense ? Nahh, forget it, it is freebs too. |
guys.... there hasn't been any real attempt to explain why they should
spend time on this.
i had the same a couple years ago with zerotier and last year with
tailscale. they consider this edge case and frankly it is.
looking at the PR history it's very (how can i say it) homelab.
i don't want to be mean but maybe phone them up instead?
…On Sat, 22 Mar 2025 at 22:03, ditronicos ***@***.***> wrote:
May be it will be easiest to try with pfsense ?
—
Reply to this email directly, view it on GitHub
<#2200 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBSQK56T3JARSBZ2QWUTP32VVUTRAVCNFSM6AAAAABJ5JPST6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBVGI4DCMRZGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
[image: ditronicos]*ditronicos* left a comment (netbirdio/netbird#2200)
<#2200 (comment)>
May be it will be easiest to try with pfsense ?
—
Reply to this email directly, view it on GitHub
<#2200 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBSQK56T3JARSBZ2QWUTP32VVUTRAVCNFSM6AAAAABJ5JPST6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBVGI4DCMRZGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Waiting on account creation too now. I'm looking for something to replace a ton of Site2Site OpenVPN Tunnels with a simpler and more "agile" solution like netbird. (That also easily works with dynamic IPs and Grade Carrier Nat on Backup Internet Connections.) It would be possible to do the same with zerotier, but only with netbird it's possible to easily self host everything. So definitly not a Homelab Topic for myself. |
I've created a quick and dirty FreeBSD port and an OPNSense plugin for the netbird client. This works quite well but I had to patch it.
To prevent netbird from messing with the routing table of the firewall I've set NB_DISABLE_CUSTOM_ROUTING to true.
Then I tried to enable a route to the network behind the firewall. This failed because the management service only allows routes to Linux clients. To fix this I made the client pretend to be running on linux. e.g. I've patched info_freebsd.go.
Now our firewall works as netbird gateway for our LAN.
Are there any plans to allow routes to FreeBSD clients?
The text was updated successfully, but these errors were encountered: