Skip to content

Instantly share code, notes, and snippets.

@reidransom
Last active May 13, 2024 13:13
Show Gist options
  • Save reidransom/6033227 to your computer and use it in GitHub Desktop.
Save reidransom/6033227 to your computer and use it in GitHub Desktop.
Configure Zeroconf on FreeBSD

Configure Zeroconf on FreeBSD

Install avahi-app and nss_mdns. Note: avahi-app is chosen over avahi because avahi depends on X11.

$ cd /usr/ports/net/avahi-app
$ sudo make config-recursive
$ sudo make install clean
$ cd /usr/ports/dns/nss_mdns
$ sudo make config-recursive
$ sudo make install clean

Add these lines to /etc/rc.conf

dbus_enable="YES"
avahi_daemon_enable="YES"

Change the hosts: line in /etc/nsswitch.conf to

hosts: files dns mdns
@sean9999
Copy link

sean9999 commented Feb 4, 2017

after which you can find conf files in:

/usr/local/etc/avahi

and services in

/usr/local/etc/avahi/services

@0mp
Copy link

0mp commented May 13, 2024

The setup is now also documented in the FreeBSD Handbook: https://docs.freebsd.org/en/books/handbook/network-servers/#network-zeroconf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment