UDP and TCP port
Port 53: DNS
Port 53 is DNS. A question and its answer usually travel as one UDP packet each way; TCP port 53 carries the answers too big for that, and zone transfers.
- An answer that does not fit is marked truncated, and the client asks again over TCP.
- DNS on port 53 is not encrypted: DNS over TLS uses port 853, and DNS over HTTPS port 443.
Check port 53 on Linux
Put the server's name or address in place of HOST.
ss -ulnp 'sport = :53'- On the server: is a program listening on UDP port 53, and which? How to read ss.
tcpdump -ni any udp port 53- On either end: the datagrams to and from UDP port 53. With UDP this is the sure test, since nothing is acknowledged. How to read tcpdump.
nmap -sU -p 53 HOST- From outside: a UDP scan of port 53. No answer reads open|filtered: UDP does not say which. How to read nmap.
ss -tlnp 'sport = :53'- On the server: is a program listening on TCP port 53, on which address, and which program? How to read ss.
nc -zv HOST 53- From a client: does a TCP connection to port 53 open, get refused, or time out? How to read nc.
tcpdump -ni any tcp port 53- On either end: the packets to and from TCP port 53, as they cross the card. How to read tcpdump.
nmap -p 53 HOST- From outside: is TCP port 53 open, closed or filtered? How to read nmap.
What runs on it
- DNS
- The distributed directory that turns names like bank.lab into addresses.
- Port
- A 16-bit number that picks the program on a device: web 80 and 443, DNS 53, SSH 22.
- Recursive resolver
- The DNS server a device asks: it does the whole search and caches the answers.
- Encrypted DNS
- DNS questions sent inside TLS (DoT, port 853) or HTTPS (DoH, port 443), so the path cannot read or change them.
- Zone transfer
- How a secondary name server copies a zone from its primary: whole (AXFR) or just the changes (IXFR), prompted by NOTIFY.
Use port 53 on real machines
- DNS: how a name finds its address, and why changes take time
- DNS servers: run the zone that answers for your names
- Is it DNS? Find where a name lookup breaks, and prove when it doesn't
Open DNS: how a name finds its address, and why changes take time