Fri, 3 Jul 2020

4:24 PM - Setup multicast dns on midnightbsd using mDNSresponder

MidnightBSD includes mDNSresponder in base. You can configure your local machine to access resources on your local network.  This can be useful to ssh into Apple Mac systems, etc.  This is sometimes called Bonjour.

To see other systems with mdns enabled on your network

Edit /etc/nsswitch.conf and add 
mdns
to hosts line.  It should read
hosts: files mdns dns

add mdnsd_enable="YES" to /etc/rc.conf

start mdnsd with service mdnsd start

To advertise services on your local machine

Add mdnsresponder_enable="YES" to /etc/rc.conf

create a new file called /etc/mdnsresponder.conf in /etc/

file contents:

#
# Example services file parsed by mDNSResponderPosix.
#
# Lines beginning with '#' are comments/ignored.
# Blank lines indicate the end of a service record specification.
# The first character of the service name can be a '#' if you escape it with
# backslash to distinguish if from a comment line.
# ie, "\#serviceName" will be registered as "#serviceName".
# Note that any line beginning with white space is considered a blank line.
#
# The record format is:
#
# 
# . 
# 
# 
#
# 
#
# Examples shown below.
#

#serviceName1
#_afpovertcp._tcp.
#548
#name=val1

SSH
_ssh._tcp.
22

#FTP
#_ftp._tcp.
#21

#HTTP
#_http._tcp.
#80

samba
_smb._tcp
445

adisk
_adisk._tcp
0
dk1=adVN=TimeMachine
adVF=0x82

deviceinfo
_device-info._tcp
0

model=Xserve

0 comments