I followed the Everything Smart Home method of getting DuckDNS working. After the initial setup everything was great. The next day when I went to login it was not working. Now when I go to domain.duckdns.org:8123 I get an error trying to get into HA. However, it does seem to work after receiving a “Dangerous” warning when I go into HA via incognito mode.
I’m very amateur at all of this but this is what I can decipher of the problem so far…
When I run nslookup for domain.duckdns.org it returns:
“non-authoritative answer” followed by an IP I don’t recognize.
After logging into my router I noticed that IP address I didn’t recognize is listed as the IP address for my modem.
In the DuckDNS logs that is also the IP that shows up constantly.
My primary DNS in my router settings is my HA and the secondary is the one that used to be in primary.
These settings are under the WAN IP Addressing section of my router. Is that the correct area to make the change?
I also see some DNS settings under LAN IP Settings but I haven’t touched anything there.
I assume the problem is something in my router setting with DNS but I can’t figure out what. I setup Dnsmasq as a workaround for my router not supporting NAT loopback.
Anyone got any ideas how to get this fixed? Cheers!
You are not specifying the correct port when you enter the address in your web browser. Port 80 will be your router, port 8123 (or whatever you forwarded) will be Home Assistant.
Sorry. Maybe I didn’t use the proper terminology. Yes I guess technically DuckDNS is working, but something isn’t and I’m trying to figure out what isn’t and how to fix it.
Problem persists when specifying port. Sorry I didn’t add that to my post, edited now. I am specifying the correct port in my URL in actuality. I also have no issue when logging in via incognito mode but I get a Dangerous warning for SSL.
From what i read is that local dns doesn’t resolve; it returns your external IP which is fine when you are external. However, when you are internal, your dns needs to resolve your local IP.
So for this to work your have basically 3 options:
create a dns record. In many routers this can be done by creating a ip reservation for the address ha is running on together with assigning the domain name. You can then access HA locally with https://reservation.domain.name:8123
After realizing my router doesn’t support NAT loopback, installed Dnsmasq and made DuckDNS URL the host so DNS server responds so that if it receives a DNS request for my DuckDNS host name it replies with internal IP of my HA instead of public IP.
Changed primary DNS to HA IP, moved previous primary IP to secondary.
Made Internal and Eternal URL in HA my DuckDNS domain names including port numbers.
Hope that explains a bit more. If not, you can watch the video or see the steps posted in his video because I followed it step by step.
I’m unclear on how you’ve set up Home Assistant to do SSL on port 8123. Can you explain that step? In my installation, I use nginx as a reverse proxy (using the nginx proxy manager addon) to handle this because I didn’t find an easy way to do this inside of Home Assistant.
Setting the external DNS as secondary may also cause issues if dnsmasq hiccups you can end up getting the external IP address for your domain instead of the internal. Windows in particular sometimes is stubborn about hanging onto addresses for domains, so it may take a reboot to restore that. If you’re using dnsmasq, I would recommend setting that as the only DNS server.
Thanks for starting this thread, by the way. I hadn’t really thought about setting up NAT reflection, and your thread prompted me to look into it and realize I can have a simpler setup.