Port 53 — DNS (UDP)
What is Port 53?
Domain Name System. Traduce domini in indirizzi IP.
This is a well-known port (0–1023) commonly used by core services like DNS. · RFC 1034, RFC 1035
When do you need Port 53 open?
Open only on authoritative or recursive DNS servers you are hosting. Not needed on typical web or application servers. Inbound queries arrive at the server — workstations and most servers only initiate DNS queries outbound.
Common uses and software
- BIND
- Unbound
- PowerDNS
- Microsoft DNS
- dnsmasq
- Pi-hole
- Cloudflare 1.1.1.1
- Google 8.8.8.8
Security
Open recursive DNS resolvers can be abused in amplification DDoS attacks — a small query generates a large response directed at a victim. Restrict recursive queries to internal clients only. Enable DNSSEC to prevent cache poisoning. For external-facing authoritative DNS, use rate limiting and monitor for unusual query volumes.
Is Port 53 safe?
An open port increases your attack surface. Safety depends on how DNS is configured.
Keep DNS up to date with security patches. Require strong authentication and restrict access to the minimum necessary IP addresses.
Test connectivity for Port 53 on any host.
How to Open Port 53
To allow incoming connections to Port 53 (DNS) from outside your network, configure your firewall and add a port forwarding rule on your router pointing to your device's local IP address.
Open Windows Defender Firewall → Advanced Settings → Inbound Rules → New Rule → Port → UDP → Specific local ports: 53 → Allow the connection → Name and save the rule.
netsh advfirewall firewall add rule name="Open Port 53" dir=in action=allow protocol=udp localport=53sudo ufw allow 53/udpsudo iptables -A INPUT -p udp --dport 53 -j ACCEPTLog into your router (192.168.1.1 or 192.168.0.1) → Port Forwarding → Add a new rule: Protocol UDP, External port 53, Internal IP: your device's local IP, Internal port 53 → Save.
How to close Port 53
If you do not need DNS, block this port in your firewall or router.
To block port 53 on Windows, run the following command in PowerShell or Command Prompt (as Administrator):
netsh advfirewall firewall add rule name="Block Port 53" dir=in action=block protocol=udp localport=53sudo ufw deny 53/udpsudo iptables -A INPUT -p udp --dport 53 -j DROPRemove or disable any port forwarding rule for Port 53.
Frequently Asked Questions
What is Port 53 used for?▾
Port 53 is the default UDP port for DNS. It is used by servers and applications that need to accept incoming connections for this service. Whether you need it open depends on whether you are actively running a DNS server — if not, it should remain closed to reduce your attack surface.
Is Port 53 safe to keep open?▾
An open Port 53 increases your attack surface. If you are not actively running DNS, close this port in your firewall and remove any port forwarding rules. If DNS must be accessible, restrict access to known IP ranges, keep the service software updated with security patches, and use strong authentication.