Make a Domain Controller reachable
This guide makes an on-premises Active Directory Domain Controller (DC) reachable through XplicitTrust, so that domain-joined Windows clients can log on, process Group Policy and reach SYSVOL, NETLOGON and mapped network drives over the tunnel.
In short
Install the agent on the DC in Asset mode, grant it with a policy, and run Domain Controller setup in the Admin Console (agent 1.133 or later). It makes the DNS Server listen on the tunnel IP, adds split DNS for the domain and puts the DC's full name and the bare domain name into the asset's DNS Names. The manual steps are below.
Before you start
- A Windows Domain Controller with the Microsoft DNS Server role, and administrator rights on it.
- For the automated setup, agent version 1.133 or later on the DC.
- A user group of the domain-joined clients and a policy for it. The clients run the app in Client mode.
- Background: split DNS and Policies.
The setup has four parts: expose the DC as an Asset, make its DNS Server listen on the tunnel IP, point split DNS for the AD domain at it, and, easily overlooked, add the AD domain name itself to the asset's DNS Names.
1. Expose the Domain Controller as an Asset
- Install the XTNA-agent on the Domain Controller in Asset mode. The DC receives a tunnel IP, for example
100.100.0.2. - Grant the clients access to it with a policy. Choose the services the clients need from the DC, or leave the predefined All service.
2. Run the automated setup in the Admin Console
Once the agent runs in Asset mode, the Admin Console recognises the DC. Open it on Assets: the detail panel starts with the banner Active Directory Domain Controller for the domain, with the button Set up.
- Choose Set up to open Domain Controller setup. Hover over a step for details.
- Leave the steps ticked, or untick the ones you want to do yourself. A domain already served by another DNS server is shown as such and left unticked. Steps already in place are marked already set and skipped.
- Choose Apply. It carries out only the ticked steps and never undoes anything. The agent applies the server-side steps with its next configuration update; until then the panel shows being applied by the agent.
- The banner reads All steps in place when everything is configured.
The steps, and what they do by hand:
| Step | Manual equivalent |
|---|---|
| Reserve UDP ports from the DNS Server | Reserve UDP ports |
| Don't announce the tunnel IP via DNS | Several DCs and unreachable addresses |
| Make the DNS Server listen on the tunnel IP | Step 3 |
| Use this server as DNS server for the AD domains | Step 4 |
| Add the server's FQDN and the domain names to DNS Names | Step 5 |
The panel is described in Domain Controller setup. If the automated setup applied everything, continue with Verify. Read on for the manual procedure and for troubleshooting.
Reserve UDP ports from the DNS Server
The Microsoft DNS Server reserves a large range of UDP ports for itself. The agent needs the UDP ports 51800 to 60000. The setup step excludes this range from the DNS Server's socket pool and restarts the DNS Server. The DNS row of the asset's detail panel shows Running (Port reservation missing) when this is missing; its wrench icon opens the panel Windows DNS Server with Exclude DNS ports. See Windows DNS Server.
3. Make the DNS Server listen on the tunnel IP
When the agent comes up in Asset mode the DC gets a new tunnel adapter and tunnel IP (for example 100.100.0.2). For the AD-zone lookups that clients send over the tunnel to be answered, the Microsoft DNS Server service on the DC must listen on that tunnel IP. Whether it does so on its own after install is inconsistent, so always verify it.
Why it's sometimes bound and sometimes not
The DNS Server binds to interface addresses according to its Listen on setting. With All IP addresses it picks up the tunnel IP, but generally only the next time the service re-enumerates interfaces, that is after a restart. The tunnel adapter usually appears after the DNS Server has started, so until the service restarts (or the host reboots) the new address may not be bound. If Listen on is set to Only the following IP addresses, the tunnel IP is never added until you add it by hand.
Check the bound addresses from the DC:
dnscmd /info /ListenAddresses
If the tunnel IP is missing, or no explicit list is configured and lookups arriving over the tunnel go unanswered, fix it in one of two ways:
- restart the DNS Server so it binds the tunnel IP:
Restart-Service DNS; or - in DNS Manager → server Properties → Interfaces, select Listen on: All IP addresses (or add the tunnel IP to the explicit list) and apply.
Telling this apart from a DNS-name problem
From a connected client, query the DC's tunnel IP directly: Resolve-DnsName dc01.example.local -Server 100.100.0.2. If the tunnel IP doesn't answer at all, the DNS Server isn't listening on it (this step). If it answers here but normal lookups still fail, the problem is split DNS or the DNS Names pin (steps 4 and 5).
4. Configure split DNS for the AD domain
Under Account → Settings → Network → DNS servers, add the Domain Controller as split DNS server for your Active Directory domain, for example example.local. Clients that can reach the DC through a policy then send all *.example.local lookups to the DC over the tunnel. See Set up split DNS.
5. Add the AD domain name to the asset's DNS Names
On the Domain Controller asset, in DNS Names, add both:
- the DC's host FQDN, for example
dc01.example.local - the AD domain (apex) name itself, for example
example.local
The full host name must come first. Windows derives the Kerberos name for LDAP from it, and with a short name or the domain name first, Group Policy fails over the tunnel.
Don't forget the bare domain name
Windows uses the AD domain name itself as a server and DFS target for domain-wide operations. \\example.local\SYSVOL and \\example.local\NETLOGON (read on every logon for Group Policy) are domain-based DFS paths, and the domain name is also used for domain-controller location.
Split DNS only steers subdomains of the AD domain (dc01.example.local) to the DC; the bare apex example.local is not covered. Unless you add it as a DNS Name, lookups for the domain name fall through to the client's normal DNS, typically the local router, which cannot resolve the internal AD zone. Group Policy, SYSVOL/NETLOGON and domain-based mapped drives then fail at logon.
Adding the apex as a DNS Name pins example.local to the DC's tunnel IP in the agent's hosts file, so domain-wide operations resolve to the reachable DC over the tunnel.
Symptoms when the apex is missing
On the client, mapped network drives come up late or not at all after logon, and the Windows Event Log shows NETLOGON 5719 (the secure channel to the domain could not be set up), SMBClient 30800 (the server name, the bare domain, cannot be resolved), and GroupPolicy 1129 (no network connectivity to a domain controller).
List the FQDN first
Enter the DC's full name first (for example dc01.example.local), before any short name (dc01) or the domain name. The first name in DNS Names is the name Windows gets back when it looks up the DC's tunnel IP in reverse.
Windows builds the Kerberos service name for LDAP from that reverse lookup. With a short name first, it requests ldap/dc01/example.local, which a Domain Controller does not register. The LDAP bind for Group Policy then fails over the tunnel only, while drives, SYSVOL and NETLOGON keep working. gpupdate reports that Windows could not authenticate to the Active Directory service (LDAP bind failed), and the GroupPolicy log shows events 7017 / 7326 with error 1326.
Multiple Domain Controllers and unreachable addresses
The AD domain name normally resolves to all Domain Controllers, and each DC publishes its on-premises LAN (and possibly IPv6) addresses. Only addresses that are reachable over the tunnel work; Windows still tries the others and they fail, which makes domain operations slow or flaky.
The setup step Don't announce the tunnel IP via DNS addresses the opposite problem: it keeps the tunnel IP out of the addresses the DNS Server publishes (PublishAddresses), so that devices outside XplicitTrust are not sent to an address they cannot reach.
To make sure the names that domain-joined clients use resolve to a tunnel-reachable address: for a single tunnel-reachable DC, the DNS Name pin from step 5 already takes care of it. If clients should use several DCs, expose each of them as an Asset and add the domain apex to each. If your internal DNS hands out addresses that are not routed through the tunnel (a DC's LAN IP, or AAAA/IPv6 records), restrict or suppress them for these names.
Recommended: avoid the logon race
Windows reconnects mapped network drives very early during logon. Even with the tunnel and split DNS configured correctly, the drive reconnect can fire before they are ready. Enable the Group Policy Computer Configuration → Administrative Templates → System → Logon → Always wait for the network at computer startup and logon so that logon waits for the tunnel and split DNS to come up.
Verify
After connecting the client, flush the resolver cache and confirm that both the domain name and the DC FQDN resolve to the DC's tunnel IP:
ipconfig /flushdns
Resolve-DnsName example.local
Resolve-DnsName dc01.example.local
Get-SmbMapping
Both names should return the DC's tunnel IP (for example 100.100.0.2), and Get-SmbMapping should list the network drives as OK. In the Admin Console, the banner of the DC asset reads All steps in place.
If it doesn't work
| Symptom | Likely cause | Go to |
|---|---|---|
| The tunnel IP of the DC does not answer DNS queries | The DNS Server does not listen on the tunnel IP | Step 3 |
dc01.example.local resolves, example.local does not |
The apex is not a DNS Name | Step 5 |
Drives, SYSVOL, NETLOGON fail at logon; events 5719, 30800, 1129 |
Apex missing, or logon race | Step 5, logon race |
gpupdate: LDAP bind failed; events 7017 / 7326, error 1326 |
A short name is first in DNS Names | List the FQDN first |
| Domain operations slow or flaky | Unreachable DC addresses are tried | Multiple Domain Controllers |
| No split DNS rule on a Windows client | Leftover registry path of an old Group Policy | DNS on Windows |
| Running (Port reservation missing) on the asset | The DNS Server reserves the agent's UDP ports | Reserve UDP ports |
Next
- Set up split DNS for other domains.
- Allow only compliant Windows devices
See also
- Concept: Names and DNS, Policies
- Reference: Assets: Domain Controller setup, Settings: DNS servers