Manage DNS in your network

You don't need to design a network or configure DHCP as it is automatically done in a single place - the NetBird Management service. NetBird assigns and automatically distributes IP addresses to your peers. Once peers have IPs, they can communicate with one another and establish direct encrypted WireGuard® tunnels. You can use these IPs to access the services running on the connected peers (e.g., SSH). Even though we trust our memory capacity, there is a limit to what we can remember, especially when it comes to IP addresses like this one,

Starting v0.11.0, NetBird automatically assigns a domain name to each peer in a private space that can be used to access the machines. E.g.,

Besides accessing machines by their domain names, you can configure NetBird to use your private nameservers, control what nameservers a specific peer group should use, and set up split DNS.


Local resolver

To minimize the number of changes in your system, NetBird will spin up a local DNS resolver.

This local resolver will be responsible for queries to the domain names of peers registered in your network and forwarding queries to upstream nameservers you configure in the system.

It listens on the peer's IP, and usually, it will use the default port 53, but if it is in use, it will use the 5053 port.


Nameserver is an upstream DNS server for name resolution, if a query comes and is not a peer domain name, it will be resolved by one of the upstream servers. You can assign private and public IPs and custom ports. Remember that you might need a network route for private addresses to allow peers to connect to it.

Match domains

Match domains allow you to route queries of names, matching them to specific nameservers. This is useful when you have an internal DNS configuration that only internal servers can resolve.

All domains option

The all domains option defines a default nameserver configuration to resolve all domains that don't have a match domain setting. Because not all operating systems support match domain configuration, we recommend configuring at least one nameserver set with this option enabled per distribution group. You may also consider using the group All for distribution, so you don't have to define multiple sets of nameservers to resolve all domains.

Distribution groups

Distribution defines that peers that belong to groups set in this field will receive the nameserver configuration.

Managing nameserver groups

A nameserver group defines up to 2 nameservers to resolve DNS to a set of peers in distribution groups.

Creating a nameserver group

Access the DNS tab and click the Add Nameserver button to create a new nameserver.


That will open a nameserver selection configuration screen where you can choose between using three predefined public nameservers or using a custom setup.

Selecting predefined nameservers

If you choose a predefined public nameserver option, you can select the following nameservers:


After selecting one of the three options, you need to assign a peer group for which this nameserver will be effective. In the example below, we chose the "All" group:


Creating custom nameservers

You can also configure a custom nameserver by clicking the Add custom button. Now you can enter the details of your nameserver.

In the example below, we are creating a nameserver with the following information:

  • Name: Office resolver
  • Description: Berlin office resolver
  • Add at least one nameserver: with port 53
  • Match mode: All domains
  • Distribution group: Remote developers


Creating a nameserver for specific domains

Sometimes we want to forward DNS queries to specific nameservers but only for particular domains that match a setting. Taking the example of custom nameservers above, you could select a match mode for only domains listed there. Below you can see the same nameserver setup but only for the domain:


Distributing the settings with groups

You can select as many distribution groups as you want for your nameserver setup. Keep in mind to link them to peers and, if required, to add access control rules when using private nameservers.

Adding remote private DNS servers

To add a private DNS server that is running behind routing peers, you need to create resources to ensure communication between your nameserver clients can communicate. In the Berlin office example from previous steps, we have a peer from the Office network that can route traffic to the IP, so we need to ensure that a similar network route exists:


Then we need to confirm that an access rule exists to connect Remote developers to Office network group:


Testing configuration

Querying records

DNS configuration has evolved in the last few years, and each operating system might expose its nameserver configuration differently. Unfortunately, tools like nslookup or dig didn't get updated to match these OS configurations, and in many cases, they won't use the same servers as your browser to query domain names.

For these cases, we listed some tools to support your checks:


You can use dscacheutil:

dscacheutil -q host -a name


You can use Resolve-DnsName on Powershell:

Resolve-DnsName -Name


In most cases, you will be fine with traditional tools because most DNS managers on Linux tend to update the /etc/resolv.conf.

# or

If your system is running systemd-resolved, you can also use resolvectl:

resolvectl query

Get started