Single URL no longer works locally (duckdns, NAT loopback ok)

Hi,

My single URL set up has suddenly stopped working.

I confirmed the following points:

  1. I can reach Home Assistant when outside my home network without issue (https://xxx.duckdns.org:8123)
  2. Pinging xxx.duckdns.org from inside my network resolves to my public IP without problems
    image
  3. Even a sensor pinging that address from within Home Assistant resolves to the same public IP
  4. I, of course, have no issues hitting the local IP (but then the SSL Certificates screams and the Companion app won’t let me connect)
  5. Port 8123 on TCP is open and ready for business (redirected to my Home Assistant instance)
    image

So everything seems to be lined up to access my Home Assistant using my duckdns address also from within my network however when I try I get this

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.

I’ll greatly appreciate any help on the matter

Many thanks

Setting up the Dnsmasq worked (which is fine for now obviously), however I still have issue with this approach:

  1. 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
  2. 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

Any suggestions welcome :slight_smile:

Many thanks

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.

Thanks again for any hints

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.

1 Like

Thanks for the explanations. I think I’ll just leave it with Dnsmasq, it works and “if it ain’t broke…”

Cheers

1 Like