I did what I think was a thorough search but couldn’t find an answer. I did not (on purpose) try to implement the DNSMasq because my understanding was that it was only necessary if your router couldn’t do NAT loopback; and besides, it was actually working a few days ago without issue.
Setting up the Dnsmasq worked (which is fine for now obviously), however I still have issue with this approach:
It really used to work before without Dnsmasq and I think I proved that my router supports NAT loopback, then why is it now no longer working without Dnsmasq
Home assistant has a tendency to crash on me for no reasons sometimes and becomes unavailable… when it’s the case my primary DNS server will no longer be available… which is less than ideal
You say you have proved that NAT Loopback is working, but you haven’t. That is exactly what would happen if NAT Loopback stopped working. You can ping the domain and get your external address, but if you try and connect to it, the connection is stopped AT THE ROUTER, and not forwarded back in to the network. Have you tried restarting your router? Have you recently upgraded the firmware on your router? (Or has it been automatically upgraded).
Why does your primary DNS go down when Home Assistant crashes? The addons are separate docker containers to Home Assistant Core, and will keep running even if Core crashes. If what you are saying is the whole machine running Home Assistant goes down, that’s more than just Home Assistant crashing.
Thanks for the quick reply.
On the NAT loopback: I thought that being able to ping your duckdns address and retrieving your external IP from within the network was enough to prove NAT Loopback but I must confess that I do not know that for a fact (source)
On the primary DNS server: I have this issue (that I’ve seen many people also have) where Home Assistant goes down, doesn’t respond to ping locally, and of course you cannot SSH into. At this point I suspect that the addons would stop working as well or at least the DNS server could not be reached since the IP is not even pingable.
EDIT: I thought about my ISP forcing an update on the router but that really would have been bad luck and bad timing… Unfortunately, I’m not able to confirm whether or not this has been the case.
You can ping the domain with or without loopback, it’s your router replying, even with loopback it’s responding to a ping packet on the external interface. Loopback isn’t about pinging, it’s about the NAT side of things. Loopback allows a device INSIDE the network to go out through the router and come back in to the router from the public side and be forwarded to the right device inside the network. When you ping though, it’s not the device inside the network that is responding to the pings, it’s the router itself, pings don’t get forwarded on to the home assistant device.