Confused about Networks and DNS

Describe the problem
My goal is to use Netbird to allow access to my homelab for friends/relatives and thus to have a granular control on what services they can access. Currently, I’m testing this with three services PiHole, Nginx Proxy Manager and Vaultwarden.

My current setup looks like this:

All of these devices are also peers in Netbird and belong to different groups:

  • Homelab (NPM, PiHole, Vaultwarden): Peers that are in my homelab
  • Vault (Vaultwarden, Pixel): Peers that make use of Vaultwarden
  • Trusted devices (XPS-15, Pixel): Peers that I trust to have access to services on my homelab, in particular those use Pihole as their DNS
  • Admin (XPS-15): Peers that have full access to the homelab
  • Proxy (NPM): Proxy peer
  • DNS (PiHole): DNS peer

Now, the problem is that if Pixel is only in group Trusted devices, it still manages to access both Vaultwarden and NPM, via vault.mytld.com and npm.mytld.com, while being outside the local network (cellular data).

Expected behavior

What I would expect, is that PiHole would resolve vault.mytld.com to mytld.com to 192.168.1.167 and then NPM would try to redirect to 192.168.1.113 but should fail since that resource is only for peers in group Vault.

Are you using NetBird Cloud?

Self-hosted Netbird

NetBird version

0.54.1

Is any other VPN software installed?

No

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings

So I am not a 100% sure about the setup yet, but currently. If I read your setup correctly, you are expecting a client to not be able to connect if they dont have the group or network for the app you are trying to make it to.

In this case, people go to NPM and from NPM to VaultWarden, if so. Once a NetBird client reaches NPM it does not further evaluate the access as NPM is a reverse proxy.

What you might be looking into, is installing a reverse proxy on every machine. (NGINX) and making the server itself proxy the request, rather then using a machine to do it directly. Saving you the trouble of having another check inside of the app.

I think this sounds overly complicated. I’ll try to explain my need in more details.
Let’s forget about the schematic I added.

Netbird is running on a VPS.

At home, I have a homelab with the following services:

  • NPM: Reverse proxy and handles HTTPS.
  • PiHole: Used as a DNS, forwards every *.domain.com to domain.com and domain.com to NPM’s IP.
  • Vaultwarden: A service accessible in my local network with vault.domain.com

I have a Pixel phone. I want this phone to access my homelab network entirely and use PiHole, so for instance access vault.domain.com when I’m on the go.

I have a family member who also needs to access Vaultwarden with vault.domain.com, but I don’t want him to access anything else on my home network.

How to make this work?

A rouch idea you could do is setup a network and make it a DNS based resource. Then allow/deny access based on the network rules of said resource. Otherwise, if you allow port 80/443 on NPM. Any domains can be accessed that are on NPM. You don’t have access to the network, but you do all domains.

Sorry, there was indeed a misunderstanding on my side about how a reverse proxy works!

No worries, it happens. Anything else you need help with?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.