Sunday, February 21, 2010

How to disable Bonjour on OSX 10.6 (Snow Leopard)

Bonjour is Apple's zeroconf protocol and iTunes (among others) uses it to broadcast the existence of its shared library, which I find annoying because it's quite chatty on the network. In the past shutting down mDNSResponder was enough to keep it quiet but this doesn't work as intended anymore on Snow Leopard as all DNS activity goes through mDNSResponder now.

Apple's KB explains how to properly disable those broadcast advertisements:
  1. sudo vim /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
  2. Add <string>-NoMulticastAdvertisements</string> at the end of the ProgramArguments array.
  3. Save the file
  4. Restart mDNSResponder:
    sudo launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
    sudo launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
There's no need to reboot unlike what the KB says, as you long as you restart mDNSResponder.

4 comments:

  1. This is a great tip but only really helps if everyone on the network does this. I'm on a huge University network and the mDNSResponder simply kills my battery because it takes about 5-10 requests / second. Thanks for the tip though!

    ReplyDelete
  2. So do you know how to disable bonjour on only one interface? I have 2 interfaces, and bonjour seems to be advertising the wrong one.

    ReplyDelete
  3. Thanks so much for this! It works beautifully!

    ReplyDelete
  4. Does this still work under Mountain Lion?

    ReplyDelete