isitdns? it's always dns  until it isn't

wiki/Troubleshooting/Why does dig say connection timed out?

Troubleshooting

❓ Why does dig say connection timed out?

timeout
nothing answered at all
means
dig asked, nothing came back
3 tries, 5 seconds each
not
"the server said no"
(that one is REFUSED)
which
find the first silent leg
run
dig @RESOLVER NAME TYPE
then
same again with +tcp
exit
status 9, no reply
wire
UDP 53 then TCP 53 (RFC 7766)

A timeout means no reply came back at all: the server is unreachable or ignores the query, the port is filtered, or the path drops it. It is not a code DNS sends back, because a server that answers is never the cause of one (RFC 1035 section 4.1.1 has an RCODE for every case where a server does answer).

Step 1: Run the interception control#

side I am asking

Run a query at an address nothing can answer, and read what comes back.

dig +timeout=2 +tries=1 @192.0.2.1 example.com A; echo $?
;; communications error to 192.0.2.1#53: timed out

; <<>> DiG 9.18.39-0ubuntu0.22.04.6-Ubuntu <<>> +timeout=2 +tries=1 @192.0.2.1 example.com A
; (1 server found)
;; global options: +cmd
;; no servers could be reached
9

192.0.2.0/24 is reserved for documentation (RFC 5737); nothing there runs a nameserver, so a timeout is the only correct result. Exit 9 is "No reply from server" (dig(1)); NXDOMAIN and SERVFAIL both exit 0, so the exit code alone tells silence from an answer. The default is three tries at five seconds each; +tries=1 +timeout=2 cuts a silent server's cost from fifteen seconds to two.

If this answers instead of timing out, something between this box and the network is intercepting port 53 and answering in the real server's place, and nothing below is trustworthy until that is fixed. Read the interception check.

Step 2: Ask a resolver you do not run#

side I am asking

Ask the same name and type at an address nothing here is configured to use.

Asks a resolver you do not run, same name, same type.

 dig @9.9.9.9 example.com A
; <<>> DiG 9.18.39-0ubuntu0.22.04.6-Ubuntu <<>> @9.9.9.9 example.com A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62799
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 265 IN A 172.66.147.243
example.com. 265 IN A 104.20.23.154
;; Query time: 82 msec
;; SERVER: 9.9.9.9#53(9.9.9.9) (UDP)
;; WHEN: Sun Sep 20 17:51:04 UTC 2026
;; MSG SIZE rcvd: 72

GO an answer here while my own resolver is silent, so it stops at mine

DO you: Open check-a-resolver

NO GO both silent from this box, so it is not one resolver

DO you: Read step 3 for this leg

run this query in the dig tool →

what each part of this output means →

The id, Query time, WHEN line and a cached TTL move between runs; that is normal.

check-a-resolver, then check-a-forwarder if that resolver forwards.

Step 3: Check TCP and DoH#

Check the one leg that stayed silent in step 2 over TCP, then check this box's own network over DoH. A dropped UDP packet and a dead server both look silent under plain UDP; TCP to the same address tells them apart when it answers (RFC 7766 section 1). The DoH query goes to a public resolver by address, not to the silent leg and not through this box's resolver, so it only tests this box's HTTPS egress.

dig +tcp @ADDRESS NAME TYPE
curl -sS --max-time 5 -H 'accept: application/dns-json' 'https://1.1.1.1/dns-query?name=NAME&type=TYPE'
ResultWhat it means
UDP times out, TCP answersUDP 53 is dropped; the server is up (RFC 7766 section 1 makes TCP mandatory, not a fallback)
UDP and TCP time out, DoH answersthis box's network works; the server, or port 53 on the path to it, is not answering. Ask the same address from another network to tell which
no HTTPS answer either (curl prints its error)check this box's own network and HTTPS egress first
a header comes back (REFUSED, or anything else)the server is up and talking; it stopped being this page's problem

side I run the resolver

If you run the server, ask it on its own loopback, where the config decides the answer rather than the network.

side I run the resolver

Asks a server whose ACL refuses this client, so the refusal arrives as an answer rather than as silence.

 dig +timeout=2 +tries=1 @127.0.0.1 example.test SOA
; <<>> DiG 9.20.29-1~deb13u1-Debian <<>> +timeout=2 +tries=1 @127.0.0.1 example.test SOA
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 51618
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 233579f1ac440a98010000006ab01c372dcbcbe3d46700f2 (good)
; EDE: 18 (Prohibited)
; EDE: 20 (Not Authoritative): (recursion disabled)
;; QUESTION SECTION:
;example.test. IN SOA
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Sun Sep 20 17:47:35 UTC 2026
;; MSG SIZE rcvd: 99

GO REFUSED and EDE 18, which is the server talking: it is up, the port is open, and the ACL is the answer

NO GO silence from the same server, so it is dropping rather than refusing

DO resolver operator: Read blackhole beside allow-query

what each part of this output means →

Two BIND settings answer "up, but not to me" differently. allow-query refuses, so the client gets REFUSED; blackhole ignores the address, so the client gets the timeout above (BIND 9 ARM).

See also#