Skip to content

DNS on Windows

On Windows, the agent steers the names of a split DNS domain to the configured DNS server with rules in the Name Resolution Policy Table (NRPT). This page shows how to check that the rules are in place after connecting, and what to do when they are not.

In short

After connecting, run Get-DNSClientNrptPolicy in PowerShell. If the output is empty, split DNS does not work. A leftover registry path from an old Group Policy is the usual cause: remove it while the agent is stopped, then start the agent again.

Check the rules

After connecting with the agent, run this in PowerShell:

Get-DNSClientNrptPolicy

The output has several lines. Look for:

  • a NameServers entry that points to the tunnel IP of the configured DNS server, and
  • a NameEncoding entry that points to the selected domain.

If the output is empty, split DNS is not working properly.

A leftover registry path

An old Group Policy that is no longer in use can leave a registry path behind. Check in the registry whether this key exists:

HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\DnsPolicyConfig

If it exists, the agent inserts its split DNS rules below it. But if this key is otherwise empty, and the key above it contains only DnsPolicyConfig, Windows ignores this key and the other key where the split DNS rules are stored.

To fix it:

  1. Disconnect in the agent.
  2. Stop the xtService in Task Manager.
  3. Check the two keys. If both are empty, remove them.
  4. Start the xtService, start the agent and connect.
  5. Run Get-DNSClientNrptPolicy again and check that the rules are now detected.

The problem can come back

If the registry path comes from a Group Policy, it is created again. Find out which Group Policy creates it and remove the registry path there.

If it still does not work

See also