I installed HASSio using the HASSio-supervisor container on unRAID docker.
The installation does not use local DNS resolvers out of the box, so I used the CLI to do this:
ha dns options --servers dns://ip-of-router
ha dns info
shows that the configured DNS resolver on the router should be used now, but it is not used, so the names of the local devices cannot be resolved and their integrations don’t work.
ha dns restart
did not help.
Restarting docker altogether did not help.
After restarting docker, the ha dns info
shows that the local dns on the router should still be used, so the config is still right.
The coredns config file looks like this:
.:53 {
log
errors
loop
hosts /config/hosts {
fallthrough
}
template ANY AAAA local.hass.io hassio {
rcode NOERROR
}
mdns
forward . dns://ip-of-router dns://127.0.0.11 dns://127.0.0.1:5553 {
except local.hass.io
policy sequential
health_check 5s
}
fallback REFUSED . dns://127.0.0.1:5553
fallback SERVFAIL . dns://127.0.0.1:5553
fallback NXDOMAIN . dns://127.0.0.1:5553
cache 10
}
.:5553 {
log
errors
forward . tls://1.1.1.1 tls://1.0.0.1 {
tls_servername cloudflare-dns.com
except local.hass.io
health_check 10s
}
cache 30
If I understand this correctly, it should be asking the local DNS on the router first. If that fails it asks some docker container (?what??) and then uses cloudflare via DoT.
Using tcpdump on the router I can see that the requests come terminated with a dot “.” like this: “a-local-hostname.”
This is not a great idea. The router would (as configured currently) only resolve “a-local-hostname” or “a-local-hostname.lan” or “a-local-hostname.lan.”
Usually I would just throw “domain lan” into /etc/resolv.conf, but I guess that wouldn’t work in this setup where such files are generated on the fly.
What would be the right way to either keep the resolver from appending a dot or to make it append “lan”?