Manage DNS in your network
With NetBird, you don't need to worry about designing your private network or configuring 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 your peers have their IP addresses, they can communicate with each other, establish direct encrypted WireGuard® tunnels, and access services running on connected peers, such as 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, 188.8.131.52.
Starting v0.11.0, NetBird automatically assigns a domain name
to each peer in a private
netbird.cloud 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.
To minimize system changes, NetBird runs a local embedded DNS resolver on each peer. This resolver handles queries for domain names of registered peers in your network and forwards queries to upstream nameservers that you configure in the system.
A nameserver is an upstream DNS server responsible for name resolution. If a query is not related to a peer domain name, it will be resolved by one of the upstream servers. You can assign private and public IPs, as well as custom ports for your nameservers. Ensure that network routes for private addresses are set up to allow peers to connect to them, when configuring private nameservers.
When creating nameserver groups without match domains, it implies that the nameservers will resolve all DNS queries. For specific cases, you may want to deploy a split horizon configuration for private or specific domains. Match domains allow you to route queries to specific nameservers, which is useful for internal DNS configurations that only internal servers can resolve.
Marking a match domain as a search domain configures peers to use only hostnames to perform FQDN queries, e.g.,
ping host-a instead of
Distribution groups define which peers will receive the nameserver configuration. They are particularly useful when using private nameservers to link routing peers and clients of the private servers.
A nameserver group defines up to 2 nameservers to resolve DNS to a set of peers in the distribution groups.
DNS tab, the
Namservers section and click
That will open a nameserver selection configuration screen where you can choose between using three predefined public nameservers or using a custom setup.
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:
You can also configure a custom nameserver by clicking
Add custom. Now you can enter the details of your custom nameserver.
In the example below, we are creating a nameserver with the following information:
Berlin office resolver
- Add at least one nameserver:
- Distribution group:
Sometimes one may 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
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.
To add a private DNS server that is running behind routing peers, you need to create resources to ensure communication between your nameserver clients.
In the Berlin office example from previous steps, we have a peer from the
Office network that can route traffic to the
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 allowing port
DNS configuration has evolved in the past few years, and each operating system might expose its nameserver configuration differently.
Unfortunately, tools like
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 -q host -a name peer-a.netbird.cloud
You can use
Resolve-DnsName -Name peer-a.netbird.cloud
In most cases, you will be fine with traditional tools because most DNS managers on Linux tend to update the /etc/resolv.conf.
If your system is running systemd-resolved, you can also use
resolvectl query peer-a.netbird.cloud