Skip to content

Instantly share code, notes, and snippets.

@Dakta
Last active August 30, 2018 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dakta/d37f038e90bcc68822efdc5b6d38985c to your computer and use it in GitHub Desktop.
Save Dakta/d37f038e90bcc68822efdc5b6d38985c to your computer and use it in GitHub Desktop.
Enable mdns on a FreeNAS/BSD jail.

Usage

Simple:

# inside a jail!
$ wget <link to mdns.sh RAW from gist e.g https://gist.githubusercontent.com/Dakta/d37f038e90bcc68822efdc5b6d38985c/raw/36da05f072982e5836a03f0ca556f3c28a6cb1e2/mdns.sh>
$ chmod +x mdns.sh
$ ./mdns.sh

Use the original Gist if you want to execute this from outside a jail.

#!/bin/sh
pkg install --yes openmdns
sysrc mdnsd_enable=yes
IFACE=$(ifconfig | grep epair | head -n 1 | cut -f1 -d:)
sysrc mdnsd_flags=${IFACE}
service mdnsd start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment