add additional dns domains to local dns resolver #1066

Closed
opened 2025-11-20 05:23:22 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @H777K on GitHub (Jul 17, 2024).

Describe the problem

I created two peers which are azure VMs in two different azure subscriptions. In the second azure subscription i have an azure container registry, which is only accessible within this network. So i created a network route which uses the second VM as routing peer and added a distribution group which consists of both VMs. In addition i specified the dns name of my azure container registry as domain.

Then i performed a netbird up on the first VM and specified the flag --dns-resolver-address which uses the netbird IP of the second VM as value.

The problem is, that the first VM resolves the azurecr.io dns name but since the azure container registry is only accessible within the second azure subscription, i receive an error, when i try to access the azure container registry. So the second VM needs to resolve the dns name of my azure container registry.

When i take a look at the output of resolvectl on my first VM i can see that the dns server is set correctly. The IP 1.2.3.4 is the IP of my second VM:

Link 5 (wt0)
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 1.2.3.4
       DNS Servers: 1.2.3.4
        DNS Domain: netbirdtest.vpn

So i used sudo resolvectl domain wt0 azurecr.io netbirdtest.vpn to add the dns domain azurecr.io, so the output of resolvectl looks like the following:

Link 5 (wt0)
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 1.2.3.4
       DNS Servers: 1.2.3.4
        DNS Domain: azurecr.io netbirdtest.vpn

With this config i am able to access my azure container registry from my first VM. However, this approach is not usable because the dns domain will be overriden after some time.

Expected behavior

I would expect that there is a flag e.g. --dns-resolver-domain-address or any other way to make this work permanently.

Is there any possability to achieve this?

Are you using NetBird Cloud?

no (self-hosted)

NetBird version

0.28.3

Originally created by @H777K on GitHub (Jul 17, 2024). **Describe the problem** I created two peers which are azure VMs in two different azure subscriptions. In the second azure subscription i have an azure container registry, which is only accessible within this network. So i created a network route which uses the second VM as routing peer and added a distribution group which consists of both VMs. In addition i specified the dns name of my azure container registry as domain. Then i performed a `netbird up` on the first VM and specified the flag `--dns-resolver-address` which uses the netbird IP of the second VM as value. The problem is, that the first VM resolves the `azurecr.io` dns name but since the azure container registry is only accessible within the second azure subscription, i receive an error, when i try to access the azure container registry. So the second VM needs to resolve the dns name of my azure container registry. When i take a look at the output of `resolvectl` on my first VM i can see that the dns server is set correctly. The IP `1.2.3.4` is the IP of my second VM: ``` Link 5 (wt0) Current Scopes: DNS Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 1.2.3.4 DNS Servers: 1.2.3.4 DNS Domain: netbirdtest.vpn ``` So i used `sudo resolvectl domain wt0 azurecr.io netbirdtest.vpn` to add the dns domain `azurecr.io`, so the output of `resolvectl` looks like the following: ``` Link 5 (wt0) Current Scopes: DNS Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 1.2.3.4 DNS Servers: 1.2.3.4 DNS Domain: azurecr.io netbirdtest.vpn ``` With this config i am able to access my azure container registry from my first VM. However, this approach is not usable because the dns domain will be overriden after some time. **Expected behavior** I would expect that there is a flag e.g. `--dns-resolver-domain-address` or any other way to make this work permanently. Is there any possability to achieve this? **Are you using NetBird Cloud?** no (self-hosted) **NetBird version** `0.28.3`
saavagebueno added the dns label 2025-11-20 05:23:22 -05:00
Author
Owner

@lixmal commented on GitHub (Jul 23, 2024):

Hi @H777K,

--dns-resolver-address is not supposed to add the client's upstream DNS, its purpose is setting the client's own DNS server listen address (I assume you have a bunch of errors in the client log about this).

For upstream DNS, please set this up in the Management UI (see the match domains section):
https://docs.netbird.io/how-to/manage-dns-in-your-network

@lixmal commented on GitHub (Jul 23, 2024): Hi @H777K, `--dns-resolver-address` is not supposed to add the client's upstream DNS, its purpose is setting the client's own DNS server listen address (I assume you have a bunch of errors in the client log about this). For upstream DNS, please set this up in the Management UI (see the match domains section): https://docs.netbird.io/how-to/manage-dns-in-your-network
Author
Owner

@H777K commented on GitHub (Aug 2, 2024):

Hi @lixmal,

thank you for the explanation!

@H777K commented on GitHub (Aug 2, 2024): Hi @lixmal, thank you for the explanation!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1066