brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: dig +tcp tests whether port 53 over TCP is open

Dig
~/tips/tip-dig-tcp-port-53-test

dig +tcp @192.168.1.1 example.com

Forces a DNS query over TCP to check that the firewall allows it.

Most DNS lookups use UDP, so a firewall that only lets UDP 53 through can look fine for years. TCP matters for big answers and zone transfers.

dig +tcp @192.168.1.1 example.com
dig +tcp +short example.com DNSKEY

+tcp forces dig to use TCP instead of UDP. If it times out while a normal query works, something blocks TCP port 53. That breaks DNSSEC-heavy answers and anything that gets truncated. The reply header of a UDP query shows the tc flag when the server wants the client to retry over TCP. Resolvers follow that rule by themselves, which is why it is worth checking.

Further reading: dig manual page

Going deeper: Guide: dig for beginners, look up DNS records and read the answer

More Dig tips dig +noall +answer DS example.com dig nope.iana.org @9.9.9.9 | grep -E 'status|SOA' dig +search nas dig @8.8.8.8 www.google.com +subnet=203.0.113.0/24 dig +yaml example.com A All Dig tips (36) All topics

Link