netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.64k stars 474 forks source link

"MagicDNS" equivalent for clients #734

Closed alexlyee closed 1 year ago

alexlyee commented 1 year ago

Currently, it seems that one is subjected to the network-wide DNS configuration when they join a netbird network. But once we are able to connect to our own as well as our friends' coordination servers (#446), the only thing left that I would really need for my use-case is the ability to configure split-tunneling for the clients which I share between multiple networks.

For example, say my homelab is at my.homelab, and my friend's is homie.homelab. My devices are shared with both of our netbird instances, but I'd like to be able to route to both of our networks seamlessly. With #446 done, maybe we'll have to switch between the networks one at a time, fine, but ideally, the client could help us route between both networks at once.

If we got to that point, where one client beneath multiple coordination servers is possible, then I'd really love to be able to route all of my DNS to my.homelab's DNS, and whenever I try to resolve anything at homie.homelab (*.homie.homelab), I use my friend's DNS.

mlsmaycon commented 1 year ago

Hello @alexlyee have you checked the creating-a-nameserver-for-specific-domains section of the documentation?

Generally the agent doesn't support multiple controller connection. You can run different agent instances with different configuration files as long as you configure different interface names and ports.

With that, if the host where you run such setup supports a good DNS policy (windows, macOS and Linux with systemd-resolved), you should be able to reach such a setup.

alexlyee commented 1 year ago

I didn't know that multiple agent instances could be run at once. I'll have to figure out how to do that on my own. With that, I suppose then this isn't really an issue?