Help with Nginx proxy manager for Remote access

Tags: #<Tag:0x00007fc414d38a30> #<Tag:0x00007fc414d38760>

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.

When I type the WAN IP address of my google wifi I get this webpage


I also got this in the log

[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 you haven’t solved it yet, I suggest Remote access with Docker

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

I guess that depends - what software/service are you using to update your IP with DuckDNS?

If you’re using Docker, then for what it’s worth, I’ve used linuxserver’s project for quite a while and it’s been very reliable for me: Docker Hub

none, I think. I just have Nginx and MariaDB installed on my rpi4 running home assistant os.

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

I see, I saw this in the home assistant addon store, would this work? if so then what will I need to configure? addons/dnsmasq at master · home-assistant/addons · GitHub

I’m not a DNS expert, but I can’t see anything in the docs there that would allow you to automatically update duckDNS.

Have you considered this integration? Duck DNS - Home Assistant