Problem when connect to HA after router change

Hi, I have configured the HA with nginx proxy manager and working but I have changed my router from the operator for a neutral one and I have configured the wifi with the same name and password so that all devices continue to work as if nothing had been changed. So far everything has worked correctly but what I have stopped working has been the main url through nginx (with the ip works). I wonder why it is failing if everything has remained the same except the router. Let’s see if someone can clarify it,

Note: The ip is forced in router and its the same.

Regards.

Some routers don’t support what is called NAT Loopback.

When NAT Loopback is working, then your request for the domain, goes out to the DNS server, which returns your external IP address as the destination, and the request goes to the router, which because it supports NAT Loopback understands how to handle the request and return to the data to your computer.

When NAT Loopback is not working however, then the request goes from your computer, to the DNS server, gets your external IP address and upon reaching your router from the WAN side, the router freaks out and thinks you are trying to access a port ON the router, rather than being port forwarded to the correct machine.

On a windows machine you can prove that the router is the problem, by editing c:\windows\system32\drivers\etc\hosts and adding the domain and LOCAL IP for the Home Assistant machine. Windows will no longer do a DNS lookup and try and connect directly to the LOCAL IP when you type in the domain.

Hi, I have linux and I put it into the /etc/hosts and now I can resolve the name but the problem now is the port. The original url is

The url is
https://hass.midominio.com/

and its points to
https://192.168.1.100:8123/

If I put in /etc/hosts

192.168.1.100 hass hass.midominio.com

The ping works but I lost the port and I can’t enter either.

Is there another solution?. Maybe there is an option in the router that you can change. What should I look for?

Regards

not sure if this will work, but can you point your /etc/hosts to the nginx proxy ip instead of HA, and let the proxy take care of the port?
other idea: use pi-hole as local DNS. add your domain in there and point it to your proxy (similar to the above idea)

Yes, this is indeed where it should be pointed.
My pihole is full of entries that all point at the same IP address (Nginx Proxy Manager)