TCP/UDP · Port 53IANA Registered

Port 53 — DNS (Domain Name System)

Translates human-readable domain names (e.g. techsimplehub.com) into numerical IP addresses. UDP is used for standard lookups; TCP is used for responses exceeding 512 bytes and zone transfers.

⚡ Primary Use Cases & Environments

  • ✓Recursive DNS resolvers
  • ✓Authoritative nameservers (BIND, PowerDNS, Cloudflare)
  • ✓Domain name resolution queries

🛡️ Security & Vulnerability Analysis

Exposed open DNS resolvers can be abused for massive Distributed Denial of Service (DDoS) DNS amplification attacks. Restrict recursive queries to authorized subnets.

🔧 Network Diagnostics & Inspection

1. Check Active Listening Sockets (Local Host)
Terminal Command
$ sudo ss -tuln | grep :53
Inspects whether any local process daemon is bound to port 53.
2. Remote Port & Service Scan (Nmap)
Terminal Command
$ nmap -p 53 -sU -sS <target-ip>
Probes target IP to determine whether port 53 is open, closed, or filtered.
3. Wireshark Capture / Display Filter
dnsWireshark Filter

🔥 Firewall Configuration Rules (UFW & iptables)

UFW (Uncomplicated Firewall)
Terminal Command
$ sudo ufw allow 53
Applies a persistent Linux UFW firewall rule for port 53.
iptables Command
Terminal Command
$ sudo iptables -A INPUT -p udp --dport 53 -j ACCEPT && sudo iptables -A INPUT -p tcp --dport 53 -j ACCEPT
Appends a direct netfilter kernel rule to the INPUT chain for port 53.

❓ Frequently Asked Questions (FAQ)

Does DNS use UDP or TCP?

Both. Standard queries and responses use UDP port 53 for speed. When responses exceed 512 bytes (or DNSSEC records) or when executing zone transfers (AXFR), DNS automatically falls back to TCP.

How do I test DNS resolution directly from the CLI?

Use dig: "dig @1.1.1.1 example.com A" or nslookup: "nslookup example.com 8.8.8.8".

Related Networking Tools & Guides