Windows – DNS recursion is insecure, but necessary for internal applications

domain-name-systemwindowswindows-server-2008

In management of a Windows Server 2008, the server hosts DNS (is nameserver) for some domains, as well as hosting some applications that are publicly accessible.

A security scan has indicated that the DNS configuration is insecure, because it allows recursive queries.

Disabling recursive queries was tried, but several problems occurred (emails sent from local apps were not delivered, and an app running locally that connects to a third-party site could not resolve the domain name for the connection, etc.). So it appears that DNS requests that are originating on the server itself rely on recursive queries to function.

Is there a way to disable recursive queries by the DNS hosted on the server while still allowing for DNS queries originating on the server to work? I'm wondering if we can disable recursive queries on the local DNS server and set the outgoing DNS in network settings to something external (like 8.8.8.8), so that outgoing DNS queries would go there first, and this server's DNS would only end up getting queried for the domains that it actually hosts locally.

Thanks for your time!

Best Answer

It's a good idea not to provide recursive lookup functionality to the entire Internet, so configuring your DNS server to only answer queries it's authoritative for is a Good ThingTM.

On the surface it sounds like the conclusion you've reached in your last paragraph is a good one: Configure the server's own TCP/IP settings to use a DNS server that is authorized to provide recursive lookups. The DNS Server process doesn't use the DNS servers configured in the TCP/IP settings on the server computer's NIC for anything in particular. Rather, it forwards requests (or uses root hints) based on the DNS Server configuration.

When the applications running on the server attempt to query for domains the DNS Server running on that machine is authoritative for the request, ultimately, will make it to the DNS Server process running on that machine and the query would be answered.

Related Topic