MacOS – How to disable Bonjour visibility after Yosemite install

bonjourmacbook promacosSecurity

Since upgrading to Yosemite (from Mavericks) my MacBook Pro (Retina mid-2014) advertises itself on Bonjour (with "whats-my-name"). It was not visible in this way prior to Yosemite, and I have no sharing features enabled on my Mac.

How do I hide it again or turn off the "whats-my-name" service?

Best Answer

There is no more com.apple.mDNSResponder.plist in OS X 10.10. The service that controls mDNSResponder is now discoverd. The plist file you are looking for is actually:

/System/Library/LaunchDaemons/com.apple.discoveryd.plist

You want to add --no-multicast to the ProgramArguments in that file.

    <key>ProgramArguments</key>
    <array>
            <string>/usr/libexec/discoveryd</string>
            <string>--udsocket</string>
            <string>standard</string>
            <string>--loglevel</string>
            <string>Basic</string>
            <string>--logclass</string>
            <string>Everything</string>
            <string>--logto</string>
            <string>asl</string>
    </array>

Becomes

    <key>ProgramArguments</key>
    <array>
            <string>/usr/libexec/discoveryd</string>
            <string>--udsocket</string>
            <string>standard</string>
            <string>--loglevel</string>
            <string>Basic</string>
            <string>--logclass</string>
            <string>Everything</string>
            <string>--logto</string>
            <string>asl</string>
            <string>--no-multicast</string>
    </array>

You'll want to be very careful when editing that file. You can also use this script to do it for you - https://raw.githubusercontent.com/MacMiniVault/Mac-Scripts/master/disablebonjour/disablebonjour.sh