Port reference › Network infrastructure

Port 53 · DNS

Domain name lookups

TCP/UDP Network infrastructure Exposure risk: Medium

What is port 53 used for?

DNS. Normal queries use UDP; large responses and zone transfers (AXFR) use TCP. Blocking TCP 53 breaks some lookups.

Well-known port (0-1023): opening it on Linux needs root (or CAP_NET_BIND_SERVICE).

Security notes

An open resolver gets abused for DNS amplification. Allow recursion only for internal networks and zone transfers only for secondaries.

Allow port 53 through the firewall

This port is risky to expose, so the commands below allow only the IPs you specify.

# Replace 203.0.113.10/32 with the IP or network you want to allow
sudo ufw allow from 203.0.113.10/32 to any port 53 proto tcp
sudo ufw allow from 203.0.113.10/32 to any port 53 proto udp
sudo ufw status

Check whether port 53 is open

sudo ss -tulpn | grep ':53 '

Ports used together

Other network infrastructure ports

67 DHCP server 68 DHCP client 123 NTP 161 SNMP 162 SNMP trap 179 BGP 514 Syslog 830 NETCONF 4789 VXLAN 5353 mDNS