Configuring mDNS on FreeNAS 11.3

ctag

Patron
Joined
Jun 16, 2017
Messages
225
Hi,

I'm trying to set up multicast DNS for my home LAN so that machines can resolve each others' hostnames for SSH connections to use with rsync backups to FreeNAS. I believe I have `systemd-resolved` configured properly for my other machines, but I cannot find much information about mDNS for FreeNAS/FreeBSD.

From my desktop I can resolve `freenas.local` to the correct IP address (although not always, but I believe that's a separate issue). From my FreeNAS machine I cannot resolve any local machine.

I've searched around a bit, and can't even tell what mDNS service FreeNAS uses or how it should be configured. FreeBSD results involve installing something (avahi or nss-mdns) and I want to hold off on that uless it's the only thing to do.

If anyone can point me in the right direction it'd be appreciated.

Thanks,
ctag
 

dopeelf

Dabbler
Joined
Feb 20, 2013
Messages
14
Looks like FreeNAS uses mDNSResponder.

Try 'getent hosts <machine name>'
 

ctag

Patron
Joined
Jun 16, 2017
Messages
225
Thanks dopeelf. I tried that and didn't get anything back:
Code:
bns-freenas# getent hosts bns-desktop.local
bns-freenas# getent hosts bns-desktop
 

dopeelf

Dabbler
Joined
Feb 20, 2013
Messages
14
If you type 'getent hosts' does it say anything?
 

ctag

Patron
Joined
Jun 16, 2017
Messages
225
I get:
bns-citadel# getent hosts
::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain
127.0.0.1 bns-citadel.csb.sh bns-citadel
::1 bns-citadel.csb.sh bns-citadel

I see one problem there, so I changed the system domain to 'local' in the UI. Now it returns:
bns-citadel# getent hosts
::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain
127.0.0.1 bns-citadel.local bns-citadel
::1 bns-citadel.local bns-citadel

bns-citadel# getent hosts bns-anarch.local
bns-citadel# getent hosts bns-anarch

Citadel is FreeNAS, anarch is Archlinux desktop.
 

ctag

Patron
Joined
Jun 16, 2017
Messages
225
Why do you need the FreeNAS server to be an mDNS client?
I want FreeNAS to back up my machines with Rsync over SSH. One of the machines is a laptop, which has a different IP based on whether it's plugged in or wireless. I previously tried a local DNS server, but couldn't get it to work well. So now I'm thinking zeroconf mDNS might be the right approach?
 

dopeelf

Dabbler
Joined
Feb 20, 2013
Messages
14
I used to do that but I got problems with the laptops not always being able to be resolved. I am doing backups on macOS laptops so I set the computer name in the Sharing preferences which is also used as the DHCP Client ID. When the laptops request a IP my router creates host entries for them and am I able to resolve the IP and do backups. The router is configured as the first DNS server through DHCP. So far it has been more reliable than using zeroconf.
 

ctag

Patron
Joined
Jun 16, 2017
Messages
225
Thanks dopeelf!

I went back and set up local DNS resolution using a subdomain of my real domain, and that seems to actually work.
 
Top