Responding to DNS port when it is not running

Connection to any IP address on port tcp/53 always responds/succeed when that IP isn't running DNS. I think something is responding from MacOS internally. How do we fix this?

MacBook Pro 14″, macOS 15.2

Posted on Dec 31, 2024 1:58 AM

Reply
8 replies

Dec 31, 2024 10:55 AM in response to sonamnamgyel

macOS itself uses a number of well-known ports, including 53 and 5353 for Bonjour multicast DNS discovery.


I don't think you can turn those off without breaking a number of subtle things the OS is doing (even if you set the most restrictive settings in the built-in Firewall - useless as it is - it will still allow a number of ports to receive connections). Third-party firewall similarly have built-in presets to allow these services to work properly and usually warn you that you will break stuff if you close them down.


But is there an actual issue here besides that your computer is responding to other devices on the local network that are advertising Bonjour services? Because that's how Bonjour and mDNS more generally is supposed to work...and, if you have certain devices on your network like AppleTVs, they may act as a sleep proxy for other devices on the network and respond to mDNS requests on their behalf when they are offline.

Jan 3, 2025 2:13 PM in response to sonamnamgyel

sonamnamgyel wrote:

Connection to any IP address on port tcp/53 always responds/succeed when that IP isn't running DNS. I think something is responding from MacOS internally. How do we fix this?

It isn't doing that here. This is what I get:


/tmp $ nc -zv www.apple.com 53
nc: connectx to www.apple.com port 53 (tcp) failed: Operation timed out


Of course, I don't run any firewalls, network filters, 3rd party "security" or "privacy" apps.

Dec 31, 2024 10:36 AM in response to sonamnamgyel

sonamnamgyel wrote:

Connection to any IP address on port tcp/53 always responds/succeed when that IP isn't running DNS. I think something is responding from MacOS internally. How do we fix this?


? what is the bigger issue here, maybe you can paint a bigger picture


old issue, new issue, what changed?


ref: TCP and UDP ports used by Apple software products - Apple Support


Jan 1, 2025 6:48 AM in response to leroydouglas

You can refer to the result below:


# nc -zv www.apple.com 53

# Connection to www.apple.com port 53 [tcp/domain] succeeded!


It’s clear that www.apple.com doesn’t host a DNS service. However, when I test it using nc or nmap, the result indicates that the connection was successful. The question is, why does it show the port as open when it’s not actually running.


thank you.







This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Responding to DNS port when it is not running

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.