Hello,
I want to be able to access my home assistant setup from outside my network. I heard the Nginx way is the most secure way to do it so I am trying to get it configured into my setup.
Here are my networking details
I have a Bell home hub 3000, wifi is disabled and I have a Google wifi router that is connected to one of the LAN ports on the home hub. It is connected via PPPOE because sadly the home hub doesn’t support bridge mode. I port forwarded ports 80-80 and 443-443 to my home assistant IP on the google wifi. My Rpi4 is connected to google wifi via ethernet.
I followed this video to setup nginx
When I go to https://canyouseeme.org/ I can see both 443 and 80 are open and Nginx is able to successfully get an SSL certificate. I tried using LTE to go to my DuckDNS domain but with no luck. There is also nothing suspicious in the logs of both Nginx and MariaDB (I did have an error of Nginx saying that server name conflict but when I reinstalled both addons that went away).
I am not really sure where to look now, so I am guessing posting this here might lead to some ideas to try.
[28/Apr/2021:01:49:27 -0400] 200 - GET http "my wan ip address" "/" [Client 192.168.86.1] [Length 625] [Gzip 1.88] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36" "-"
So I think Port forwarding is working but nginx is not? even though its setup
I found the issue is directly related to the duckdns domain. when I readded the domain in ducks it solved the issue. But after a few days, I couldn’t access HA. But after readding the domain it started to work again. Although I found the issue I don’t know any solution yet
If your URL is stopping working after a few days, then it sounds like whatever Dynamic DNS service you’re using isn’t successfully udpating the IP address in DuckDNS. You can test this by waiting until it breaks, then comparing the IP in DuckDNS to your public IP.
Yup you are correct. It was running for 2 weeks and today it happened. I checked the IP address and they weren’t the same. do you know how to fix this? not a good networking guy
Ok, so that’s the problem. Because your IP address is dynamic, i.e. it changes every few days, you need a way to automatically update DuckDNS with your new IP address when it changes.
The linuxserver container I linked to above is one way of doing that, and you can find various others for different environments here: Duck DNS - install