home-assistant / plugin-dns

CoreDNS implementation for Home Assistant
Apache License 2.0
17 stars 14 forks source link

.mydomain.local domain names no longer work #93

Closed mrgfisher closed 2 years ago

mrgfisher commented 2 years ago

Hi,

I've seen other (now closed) bugs that .local is no longer a supported thing. However, the change stops integrations to synology, camera, the recorder etc where they have names such as recorder.mydomain.local

For now, I've reverted to an earlier build (thank goodness for snapshots).

Naturally I used a DNS on my local network that handles the 'mydomain.local'.

Is it 'desired' that the change https://github.com/home-assistant/plugin-dns/commit/8e0ea74e46bd85579948b0e3b1e0bbad35bbacc7 stops any form of forwarding?

Apols if I'm reading the commit wrong, or if having a 'mydomain.local' is a bad thing, or if I've missed somethin in release notes - I do read them and am a happy suscriber to casa. If I do need to stop using .mydomain.local then its a fair amount of pain to rebuild AD domain, fixup broken (domain) devices, reconfigure a few dozen devices and finally rebuild customisation within home assistant.

mdegat01 commented 2 years ago

.local is reserved for mdns. It's not a domain that DNS resolvers should be answering queries on. That's why for example if you do dig <something>.local you get this warning in the output:

;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS

And just to clarify on that PR, after #73 plugin-dns no longer resolves multicast names (single-label names or ones that end in .local) by itself. It simply hands those queries off to systemd-resolved on the host.

Systemd-resolved on the host knows mdns, llmnr and the DNS server(s) you see in locals when you run ha dns info. It can use any and all of that information to resolve queries. It doesn't use the last part though for the same reason dig gives that output, you aren't supposed to forward multicast names to DNS resolvers (see here for the systemd-resolved code that handles this).

So yea I'm sorry for the inconvenience here but if you were relying on your DNS server giving answers for .local queries then you're going to need to switch to a different internal TLD like .lan or .home.arpa. Something that isn't reserved for multicast queries in the spec. Or if you prefer you can switch to a container install as then you can take greater control over the network settings and do what you wish with .local.

mrgfisher commented 2 years ago

Thanks @mdegat01 for the reply and detail. I wasn't aware that .local as a TLD is reserved / restricted in its application. Unfortunately my 'local' domain and setup with Active Directory uses something like .mydomain.local

Closing the ticket.