Skip to content

Set up split DNS

This guide sends DNS queries for one of your domains, for example corp.example.com, to a DNS server behind a gateway while all other queries keep using the device's normal DNS. Background: Names and DNS.

In short

Make the DNS server reachable (an Asset or Virtual Asset), grant it with a policy on DNS, and add it with its domains under Account → Settings → Network → DNS servers.

Before you start

  • A DNS server reachable as an Asset (the agent runs on it or on a machine beside it) or as a Virtual Asset. See Reach a server or Reach a printer, NAS or camera.
  • The DNS service is defined and offered on it, usually TCP and UDP 53, and a policy grants your users this destination. Agents configure a split DNS rule only for servers they can reach through a policy.
  • The domains it answers, as valid DNS names.
  • For an Active Directory domain, read Make a Domain Controller reachable too: the bare domain name needs an extra step.

1. Add the DNS server and its domains

  1. Open Account → Settings and the Network tab.
  2. In the card DNS servers, use Add DNS Servers and choose the Asset or Virtual Asset.
  3. Choose Add Domains and enter the domains, for example corp.example.com.
  4. Choose Apply.

A server that is not global needs at least one domain. See DNS servers.

Subdomains only

A rule for example.local steers subdomains such as host.example.local to the DNS server, but not the bare name example.local.

Sending all queries instead

Instead of domains you can tick Global DNS server: all DNS queries of the connected client then go to this asset while the tunnel is up, and the device's previous resolver is kept as a fallback. A global server cannot have domains, and it must also resolve public names.

2. Grant access to the DNS server

Create or extend a policy with the user groups as Sources and the DNS server as destination, on the DNS service. See Create a policy.

Verify

  1. Connect a client that the policy covers.
  2. Resolve a name in the domain, for example nslookup host.corp.example.com. It returns the internal address.
  3. A name outside the domain still resolves as before.
  4. On Windows, the rule shows up in the name resolution policy table:
    Get-DnsClientNrptPolicy
    

The output has a NameServers entry pointing to the tunnel IP of the DNS server, and a NameEncoding entry for the selected domain. An empty output means split DNS does not work.

If it doesn't work

  • No rule on the client. The client has no policy to the DNS server, or the server never connected: assets that never connected are not offered in the settings.
  • Query goes out, no answer. The DNS service must listen on the tunnel IP of the server. Test with nslookup host.corp.example.com <tunnel IP>.
  • On Windows the rule is missing, Get-DnsClientNrptPolicy is empty. See DNS on Windows.
  • The bare domain does not resolve. Add it as a DNS Name of the server, see Make a Domain Controller reachable.

Next

See also