How to Set DNS

Purpose

How to Configure DNS Settings in Netmaker

Introduction to DNS Levels

Netmaker provides a flexible approach to DNS management, ensuring that name resolution is both automated for internal networking and customizable for specific infrastructure needs. DNS can be configured in three different ways:

1. Netmaker Private DNS

This is the built-in, managed DNS solution. It automatically generates DNS entries for every node added to the network. It also supports manual custom IP entries, providing a seamless way to manage internal domain names without external dependencies.

2. Your Private DNS (Internal Infrastructure)

For organizations with existing internal DNS servers (e.g., in a physical office or data center), Netmaker can be configured to bridge these services. This typically involves setting up an Egress point to the internal nameserver and assigning that server's address to the Network or Gateway level.

3. Public DNS

When utilizing the Internet Gateway feature to route traffic to the open web, it is essential to configure public DNS providers (such as Google 8.8.8.8 or Cloudflare 1.1.1.1). This ensures that clients connected to the gateway can resolve public internet addresses effectively.

Accessing the DNS Management Interface

To begin managing these records, navigate to the DNS section using the left sidebar menu in the Netmaker dashboard. Upon entering this section, you will see the DNS Records table.

This table displays the automatically generated internal domain names for your nodes. These entries are created the moment a node joins the network, providing immediate connectivity via hostnames rather than raw IP addresses.

This table also contains any custom entries that you create.

Adding Custom DNS Entries

Beyond automatic records, you can manually create entries to point to specific services or internal servers. This is particularly useful for establishing friendly names for applications running on specific nodes.

  1. Navigate to the DNS section using the left sidebar menu.

  2. Observe the DNS Records table to see existing auto-generated records.

  3. Click the + Add DNS Record button to open the manual entry dialog.

In the Create a DNS Entry modal, define your custom record:

  • DNS name: Enter the desired hostname (e.g., app.server).

  • Address to alias: Type the target IP address (e.g., 192.168.57.37) or select a node from the dropdown.

  • Click Create DNS to save the record.

Configuring Name Servers

If your infrastructure includes a dedicated internal DNS server (for example, at a remote office or data center reachable via an Egress gateway), you can configure your resources to use that specific nameserver for specific match domains. You can also specify public nameservers here.

  1. Ensure you have identified the IP address of your DNS server, and ensure it is reachable from your network. Gor private nameservers, this is typically accomplished via Egress.

  2. From the DNS dashboard, navigate to the Nameservers tab and click the Add Nameserver button in the top-right corner.

  3. From here, you have many options to configure your nameserver, including:

    1. Name: identify the nameserver

    2. nameservers: the IP address(es) for this configuration

    3. Match domains: which domains this nameserver should work for

    4. Peers: Specifies which groups of resources this will be applied to

Click Create to apply the nameserver settings to the network.

Applying these settings ensures that all devices within the network use the specified servers for their DNS queries, allowing for seamless integration with existing private infrastructure.

Device-Level DNS Settings

Device-level DNS configuration provides the most granular control within Netmaker, allowing administrators to toggle DNS management for individual nodes or define specific nameservers for WireGuard configuration files. This is particularly useful for troubleshooting or for devices that require specialized DNS routing.

Managing DNS on Individual Nodes

For devices running the Netclient, you can manually enable or disable the software's ability to manage the system's DNS settings. This is handled through the node edit interface.

  • Navigate to the Nodes section in the left sidebar and select the device you wish to configure.

  • In the Update device modal, locate the DNS toggle switch. Enabling this allows the NetClient to configure the node's local DNS to resolve internal network names.

  • Click Update Device to save the preference.

Custom DNS for WireGuard Configurations

When generating manual WireGuard configuration files for external clients, you can specify a custom DNS server that the client will use once the tunnel is active.

  1. From the Nodes screen, click on the Config files tab at the top of the page.

  2. Find the specific configuration file (e.g., edge-server) and select Edit from the options menu.

  3. Expand the Advanced Settings section to reveal additional parameters.

  4. Locate the DNS (Optional) field and enter the desired DNS server IP address. This ensures that any client using this specific configuration file will resolve queries through the defined provider.

Last updated

Was this helpful?