DNS Server Cache Snooping on Windows Server: Disable Recursion or Limit It with a Recursion Scope

Scan says DNS Server Cache Snooping Remote Information Disclosure? Microsoft says no code fix: keep the server internal, block public access or disable recursion (dnscmd /NoRecursion, Set-DnsServerRecursion), or use a recursion scope.

Home › Guides › DNS cache snooping

Last updated 23 November 2026

Quick answer

A vulnerability scan reports DNS Server Cache Snooping Remote Information Disclosure against a Windows DNS server: it answers queries for third-party domains that don't have the recursion bit set, so someone can find out which names the server resolved recently. Microsoft's article (KB 2678371) says there's no code fix, because this is a configuration choice, and gives three options: leave recursion enabled if the DNS server stays on a corporate network that untrusted clients can't reach, don't allow public access to DNS servers that do recursion, or disable recursion. To disable it: DNS Manager > server Properties > Advanced > Disable recursion, dnscmd <ServerName> /Config /NoRecursion 1, or Set-DnsServerRecursion -Enable $false. Only do that on a server that answers solely from its own zones: it then can't resolve any name in zones it doesn't host and can't use forwarders. On Windows Server 2016 and later, a recursion scope and policy can keep recursion for internal clients and block it for everyone else.

Which option fits your DNS server?

Option (KB 2678371)When it fitsWhat to expect
Leave recursion enabledThe DNS server stays on a corporate network that untrusted clients can't reach (typical for domain controllers behind a firewall)The scan finding stays; per the report text, an internal-only server limits the attack to the internal network (employees, consultants, guest network or Wi-Fi users)
Don't allow public access to recursive DNS serversThe server does recursion and is reachable by untrusted clientsNot covered in Microsoft's article: it gives no steps for restricting access
Disable recursionThe server returns data only from local zones and never recurses or forwards for clientsNo resolution for zones not held locally, no forwarders on that server; clients typically can't be pointed at it
Recursion scope and policy (Windows Server 2016 and later)The same server is authoritative for external clients and resolves names for internal clientsDefault scope (.) disabled, a scope with recursion enabled applied to queries on the internal interface

What the scanner is reporting

KB 2678371 quotes a typical report: The remote DNS server is vulnerable to cache snooping attacks. The remote DNS server responds to queries for third-party domains that do not have the recursion bit set. This may allow a remote attacker to determine which domains have recently been resolved via this name server, and therefore which hosts have been recently visited. It rates the issue Medium, CVSS base score 5.0, and its own solution line is just "Contact the vendor of the DNS software for a fix."

The article explains that the cached record's remaining TTL can show quite precisely when a name was looked up, which reveals which vendors, banks or service providers an organization uses, and that cache snooping is possible even if the server isn't configured to resolve recursively for third parties, as long as it provides records from its cache to them. Microsoft's cause line: the finding is typically reported on DNS servers that do recursion. By default, Microsoft DNS servers allow recursion.

Decide before you change anything

Microsoft's guidance in the article:

The older Disable Recursion on the DNS Server page (Windows Server 2008 R2) adds a second reason: attackers can use recursion to deny the DNS Server service, so a server that isn't meant to receive recursive queries should have it disabled. If clients start failing to resolve Internet names after the change, see DNS server cannot resolve Internet names.

Disable recursion

Membership in the Administrators group, or equivalent, is the minimum Microsoft lists.

  1. DNS Manager: right-click the DNS server, select Properties, open the Advanced tab, select Disable recursion under Server options and select OK.
  2. dnscmd, from an elevated command prompt: dnscmd <ServerName> /Config /NoRecursion {1|0}. Type 1 to disable recursion and 0 to enable it (the default). <ServerName> is the DNS host name or IP address; a period (.) means the local computer, so dnscmd . /Config /NoRecursion 1 disables it locally. dnscmd /Config /help shows the full syntax. The current dnscmd reference documents the same switch as /norecursion [0|1].
  3. PowerShell: Set-DnsServerRecursion -Enable $false (the parameter alias is -EnableRecursion; add -ComputerName for a remote server and -PassThru to see the result). Check with Get-DnsServerRecursion: Microsoft's example output of a server with recursion off shows Enable : False.

To undo it, clear the check box, run dnscmd . /Config /NoRecursion 0 or Set-DnsServerRecursion -Enable $true. Both Microsoft pages warn that with recursion disabled you can't use forwarders on the same server; check forwarders and conditional forwarders first if the server forwards today.

Set-DnsServerRecursion also has -SecureResponse: with $True the server caches only records in the zone of authority of the queried remote server, to prevent cache pollution. That's a different protection; Microsoft doesn't present it as a fix for cache snooping.

Keep recursion for internal clients only (Windows Server 2016 and later)

Microsoft's DNS Policy pages call this selective recursion control: the same server stays authoritative for external clients but resolves names only for internal ones, so it isn't an open resolver. A recursion scope is a set of recursion settings (a forwarder list and whether recursion is enabled); the legacy setting is the default scope, named dot (.), which you can't add or remove. Microsoft's sample from the DNS Policy overview:

Set-DnsServerRecursionScope -Name . -EnableRecursion $False
Add-DnsServerRecursionScope -Name "InternalClients" -EnableRecursion $True
Add-DnsServerQueryResolutionPolicy -Name "SplitBrainPolicy" -Action ALLOW -ApplyOnRecursion -RecursionScope "InternalClients" -ServerInterfaceIP "EQ,10.0.0.34"

The first line disables recursion in the default scope, the second creates a scope with recursion enabled, and the third applies it to queries that arrive on the server interface with IP address 10.0.0.34 (replace it with your server's internal interface address). Queries on other interfaces match no policy and get the default setting, recursion disabled. Recursion policies can only be created at the server level. Microsoft's split-brain deployment page shows the same pattern with SplitBrainRecursionPolicy. Add-DnsServerRecursionScope can also set forwarders for the scope, for example Add-DnsServerRecursionScope -Name "ScopeInternal" -Forwarder 10.0.0.1,172.22.0.1 -EnableRecursion $True -PassThru.

Whether a scanner still reports cache snooping on the internal interface afterwards isn't covered in Microsoft's pages; rescan from the network the finding came from.

Related tools and guides

Look up DNS Server events such as 4013 and 7062 in the Windows Event ID Lookup, copy the Set-DnsServerRecursion and recursion scope lines from the PowerShell Cheat Sheet, pull domain names out of scanner reports with the Regex Tester, list the internal subnets that should keep recursion with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify devices on the internal network with the MAC Vendor Lookup. Related guides: forwarders and conditional forwarders, DNS server cannot resolve Internet names, domain controller DNS client settings and common Windows DNS Server and DHCP Server errors.

Want to block or allow queries by name, subnet or query type instead? See DNS policy query filters.

Also serving different records to internal and external clients from this server? See split-brain DNS with DNS policy zone scopes.

Every Windows DNS Server and DHCP Server event and symptom in one place: common Windows DNS Server and DHCP Server errors.

FAQ

What is DNS server cache snooping?

Querying a DNS server, without the recursion bit, to see whether it has a record cached and so learn which names it resolved recently. The remaining TTL of the cached record can show when. Scanners report it as DNS Server Cache Snooping Remote Information Disclosure.

Is there a Microsoft patch for DNS cache snooping?

No. Microsoft (KB 2678371) says there is no code fix because it is a configuration choice: leave recursion enabled on internal-only servers, do not allow public access to recursive DNS servers, or disable recursion.

How do I disable recursion on a Windows DNS server?

In DNS Manager open the server Properties, Advanced tab, and select Disable recursion. Or run dnscmd . /Config /NoRecursion 1 or Set-DnsServerRecursion -Enable $false. Check the result with Get-DnsServerRecursion.

What breaks when I disable DNS recursion?

The server can no longer resolve names in zones it does not host and cannot use forwarders, so clients typically cannot use it as their DNS server. Microsoft says a server meant to recurse names for its clients cannot have recursion disabled.

Can I allow recursion only for internal clients?

On Windows Server 2016 and later, yes: disable recursion in the default recursion scope, add a scope with recursion enabled and apply it with Add-DnsServerQueryResolutionPolicy -ApplyOnRecursion to queries on the internal server interface.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.