Fix an open DNS resolver after a Shadowserver report
A Shadowserver report lists your IP with the openresolver tag. Find which software answered on port 53, then fix an open DNS resolver in BIND, Unbound, Windows Server or MikroTik without taking your own zones offline.
Offensly Team··5 min read
Your hosting provider forwards a Shadowserver report, and one line in the attached CSV has your server in it:
"2026-11-19 03:12:40",medium,203.0.113.53,udp,53,ns1.example.com,openresolver,,64500,ZZ,Region,CityThe tag that matters is openresolver. Shadowserver sent the equivalent of dig +short @203.0.113.53 dnsscan.shadowserver.org from the internet, and your server looked the name up and returned the right address (Shadowserver report description). Anyone can now use it to bounce large DNS answers at a spoofed victim address. To fix an open DNS resolver you first need to know which software answered, because the setting lives in a different place for each.
Reproduce the open resolver from outside your network
Run the test from a network that is not yours, such as a phone hotspot or a cloud VM. From inside, your own addresses match the allowed list and the server answers, which proves nothing. Only run checks like these against sites you own or are allowed to test.
$ dig @203.0.113.53 www.example.org A
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18233
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1Ask for a name the server is not authoritative for. NOERROR with an answer and the ra flag means it recursed for a stranger. If the server also hosts your zone, a query for example.com still returns NOERROR, but with the aa flag. That is authoritative service, and it has to keep working after the fix.
Find which software answered on port 53
On Linux:
$ sudo ss -lunp 'sport = :53'
UNCONN 0 0 203.0.113.53:53 0.0.0.0:* users:(("named",pid=812,fd=40))The report usually lands on one of these:
- BIND serving your zones, where someone added
allow-query { any; };so the world could read the zone. Whenallow-recursionis not set, BIND falls back toallow-query-cacheand then toallow-query(BIND 9 reference). The line meant for authoritative data opened recursion too. - Unbound listening on
0.0.0.0with anaccess-control: 0.0.0.0/0 allowline copied from a tutorial. - A Windows DNS server, often a domain controller, reachable on a public IP or through a port forward. Recursion is on by default there.
- A MikroTik router with
allow-remote-requests=yes, which answers on UDP and TCP 53 on every address it has, WAN included (MikroTik DNS manual).
If nothing on the reported IP listens on 53, look for a port forward of 53 on the edge firewall to an internal resolver. Remove the forward; the resolver itself is fine.
Fix an open DNS resolver in BIND, Unbound, Windows or MikroTik
BIND. Separate who may read your zones from who may use the cache:
acl "trusted" { 198.51.100.0/24; localhost; localnets; };
options {
allow-query { any; };
allow-recursion { trusted; };
allow-query-cache { trusted; };
};If no client uses the server as a resolver, set recursion no; instead. RFC 5358 recommends turning recursion off on authoritative-only servers and says servers should not offer recursion to external networks by default (RFC 5358, section 4). Run named-checkconf, then rndc reconfig.
Unbound. It refuses everyone except localhost unless told otherwise, so the open state comes from your own access-control lines. Replace them with your real client ranges:
server:
access-control: 0.0.0.0/0 refuse
access-control: ::0/0 refuse
access-control: 127.0.0.0/8 allow
access-control: 198.51.100.0/24 allowCheck with unbound-checkconf and apply with unbound-control reload (unbound.conf manual).
Windows Server DNS. On a server that only hosts zones, open DNS Manager, right-click the server, choose Properties > Advanced and tick Disable recursion (also disables forwarders) (Microsoft Learn). PowerShell: Set-DnsServerRecursion -Enable $false, then Clear-DnsServerCache. Without the cache flush, names already cached are still answered for a while and your next test looks like the fix failed.
Do not tick that box on a domain controller your workstations use for lookups. Microsoft warns against it, and every client loses name resolution. There the fix belongs on the firewall: block inbound UDP and TCP 53 from the internet to that host.
MikroTik. If the router should not be the LAN's resolver, set /ip/dns/set allow-remote-requests=no (WinBox: IP > DNS, Allow Remote Requests). If it should, keep it on and drop port 53 from the WAN:
/ip/firewall/filter/add chain=input in-interface-list=WAN protocol=udp dst-port=53 action=drop
/ip/firewall/filter/add chain=input in-interface-list=WAN protocol=tcp dst-port=53 action=dropThe default configuration has these rules; they vanish when someone replaces the firewall with a custom one. Move both above any rule that accepts input on the WAN, since filter rules match top down. On PPPoE links the WAN is the pppoe-out interface, not the ethernet port under it.
What not to break while closing it
Do not block port 53 on a server that is authoritative for your domain. The open resolver disappears, and so does your domain. The fix there is the recursion setting, never the port.
Block TCP as well as UDP, and repeat every rule for IPv6. Shadowserver publishes the report for IPv4 and IPv6 separately, and a resolver closed on one address family is still open on the other.
If you take the chance to move zones to a dedicated DNS host, a signed zone needs its DS record updated at the registrar, or you trade this problem for a DNSSEC DS record mismatch.
Who pays for an open resolver
Your server and uplink carry attack traffic aimed at someone else, and the abuse contact for your IP range keeps receiving reports. A provider that loses patience can filter port 53 to your address, which also cuts off any legitimate DNS service on it. The fix is one configuration change, usually under an hour once you know which software answered.
Repeat the test from outside
$ dig @203.0.113.53 www.example.org A
;; WARNING: recursion requested but not available
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 50071
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1REFUSED, no ra flag, no answer. Repeat it against the server's IPv6 address, then query your own zone name, which should still answer with aa. Reply to the abuse ticket with this output; it is what the provider wants to see.
The advanced DNS check in a free Offensly account tests the name servers of a verified domain for open recursion, along with DNSSEC, CAA and dangling or suspicious subdomain delegations.
Check your own domain in seconds
The free check reads your SPF, DKIM, DMARC and MX records and tells you exactly what to fix. No sign-up.