OS X uses the mDNSResponder process for unicast DNS (Domain Name System) as well as Bonjour. Disabling the mDNSResponder process also disables unicast DNS resolution. Without unicast DNS resolution, OS X cannot resolve hostnames such as www.apple.com.
In OS X Snow Leopard and later, you can use the steps below to disable Bonjour service advertising without disabling DNS query operations, like Bonjour service discovery, and translation of host names to IP addresses.
Important: Follow these steps carefully. A malformed or problematic mDNSResponder.plist file may prevent your Mac from starting up. As a precaution, perform a full backup of your system with Time Machine before performing these steps.
- Make a back up copy of the mDNSResponder.plist file as a precaution.
- Open the mDNSResponder.plist file in Terminal using your preferred text editor. Here is a sample command:
sudo nano "/System/Library/LaunchDaemons/com.apple.mDNSResponder.plist"
- Add "<string>-NoMulticastAdvertisements</string>" to the array in the "ProgramArguments" section.
Example:
<key>ProgramArguments</key> becomes...
<array>
<string>/usr/sbin/mDNSResponder</string>
<string>-launchd</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/mDNSResponder</string>
<string>-launchd</string>
<string>-NoMulticastAdvertisements</string>
</array>
- Save the file.
Important: If you edited this file using emacs, you must remove the emacs backup file (the file with a tilde at the end of the name, "/System/Library/LaunchDaemons/com.apple.mDNSResponder.plist~") or your Mac will not start up.
- Restart your Mac.
Note: In Mac OS X v10.5 and earlier, the only way for a network administrator to disable Bonjour advertising of services is to completely disable the mDNSResponder process. This also disables Bonjour discovery of services (such as discovering network printers).