I have my hassio set up accessible externally with my own domain name, all set up with duckdns and let’s encrypt, and it works great; unless I’m at home. When I try to connect to “https://:8123” it just gets stuck saying “connecting”, same thing happens on my phone. Switch to mobile data or a VPN and it works no problem, so it’s definitely an issue connecting internally.
I can still connect using the local IP address, although it complains about the certificate. I’ve solved the issue on my desktop by adding an entry to the hosts file. My phone is the issue though, as it obviously needs to connect both locally and externally. It’s not just the web interface either, I can get MQTT working on my phone externally, but not internally.
I know that this isn’t normal behaviour because I had it all set up at my parents house just fine, but now I’m back at uni I can’t get it to work. I don’t if it’s a problem with my router or my configuration, I’ve got a TalkTalk super router with all the relevant ports forwarded.
Here’s the relevant section of my configuration.yaml:
Your router either doesn’t support NAT Loopback, or it’s not enabled. If your router doesn’t support NAT Loopback, you’ll need to resolve your external IP to the local server using another method, such as Dnsmasq or the hosts function of Pi-hole. I’ve also seen mention of someone using the new Caddy addon on the forums.
I don’t know how to do it with Dnsmasq. The DIY Futurism blog has an article that mentions how to do it using Pi-hole. Since I already use Pi-hole, this was a simple fix. Scroll down to where it says: “Routing traffic locally” for details on how to add your IP address as a host in Pi-hole.
Are you using Hass.io? I don’t know how to do it with other versions of Home Assistant, but in Hass.io, go to the Pi-hole addon config section and look for the “hosts” section. Add the URL and the IP address you want the URL to resolve to in the format mentioned on the DIY Futurism blog that I linked to.