DNS issues with netbird client on TrueNAS

I have been using TrueNAS for an year and new to the forum. Hope someone has experienced the issue I am facing with Netbird client.

I have tried both the Official TrueNAS app and also a custom app with both having the same behaviour.

When clients are connected to netbird, they get a 100.x.x.x ip address in the network and a dns name like xyz.netbird.selfhosted. I am able to reach from my TrueNAS host and other truenas apps to the ip addresses, but not the dns names as the dns resolution is failing.

I can confirm that the resolution works fine on the netbird container, but not on TrueNAS host. I don’t think this is a TrueNAS specific issue, I have seen similar behaviour when deployed on a different Ubuntu instance, but in that case I was able to directly install the client on the host, instead of a docker container to resolve. This is not possible with TrueNAS.

If I do a netstat -tunlp | grep netbird, I can see the netbird dns ip entries with port 5053 listed here. I checked resolv.conf on the TrueNAS host and it only shows my local dns. resolv.conf on the container has the netbird dns ip.

Is there a way to get this working in TrueNAS. Hoping someone had this issue before and can help me with a resolution.

Also wanted to add that the container uses host network.

On my private Network, I run a split-horizon DNS server for my domain. My domain is registered with cloudflare and my public FQDN’s are resolved by cloudflare. On my split-horizon DNS server, I’ve A and PTR records for all my private hosts. My network DHCP server assigns the split-horizon DNS server to all my private hosts. The split-horizon DNS is configured to serve out those host names on my local network for my domain and forward all other requests upstream to cloudflare DNS. My Netbird client is configured to use my split-horizon DNS server as the primary DNS. This works perfectly for me.

1 Like

Thanks very much. I have an adguard dns in my private network. Will give it a try. I have a netbird client in the cloud as well. I thought I may not be able to still address this if I add my local dns to netbird.

1 Like

Make sure your local adguard DNS server forwards and caches requests that are not resolvable from its own local local zones to an upstream DNS server. Then configure your Netbird dashboard settings to use your adguard DNS server.