How to install and configure mDNSResponder


New Member

Reaction score: 1
Messages: 8

Wasn't able to find much info on configuring mDNSResponder. Most posts talk about using Avahi or Netatalk. I was using Avahi on FreeBSD 11 and recently clean installed FreeBSD 12-Release and read somewhere that mDNSResponder is more lightweight (but don't quote me on that :p).

Anyhow, I was able to get it working with the following steps so figured I'd share in case it helps anyone else, too (thanks to the info I found in

1. Install net/mDNSResponder with pkg:
sudo pkg install mDNSResponder

2. Create an mdnsresponder.conf file:
sudo pico /usr/local/etc/mdnsresponder.conf
For example, to broadcast services for SSH (port 22) and Samba (port 445):
Server Name
_ssh._tcp. local.

Server Name
_smb._tcp. local.
3. Add the following to /etc/rc.conf:
sudo pico /etc/rc.conf
# mDNSResponder
mdnsresponderposix_flags="-f /usr/local/etc/mdnsresponder.conf"
4. Start the service:
sudo service mdnsresponderposix start

From a Mac on the network you can then use ssh hostname.local to connect or look for the SMB server in the Finder's sidebar.

If you make any edits to the mdnsresponder.conf file you can restart it to apply the changes:
sudo service mdnsresponderposix restart
Last edited: