Remote access Doen't work (DuckDNS and NGINX)

Hi, I’m getting problem with remote access configuration.
I read a lot of tutorial from Youtube but I wasn’t able to activate remote access to HA.

I set port mapping to my HA (installed on Rpy 3):

I created a domain on DuckDNS
Installed DuckDNS extension on my HA:

domain:
   - midm.duckdns.org
token: XXXXXXX
aliases: []
lets_encrypt:
   accept_term: true
   algo: secp384rl
   certfile: fullchain.pem
   keyfile: privkey.pem
seconds: 300

I launched the DuckDNS service and checked the log for successfully procedure. fullchain and privkey are correctly created.

I installed NGINX component of HA

domain: midm.duckdns.org
hsts: max-age=315360000; includeSubDomains
certificate: fullchain.pem
keyfile: privkey.pem
cloudflare: false
customize:
  active: false
  default: nginx_proxy_default*.conf
  servers: nginx_proxy/*.conf

Also set ports 443 and 80

Last I insert into configuration.yalm the followed:

http:
   use_x_forwarded_for: true
   trusted_proxies:
      - 192.168.1.10 #local ip of my Rpi3 with installed HA
      - 127.0.0.1

After restart HA, I’m able to connect it locally (using IP address with 8123 port) but from outside of my lan I cannot reach my HA (using midm.dockdns.org… I tried with 80 and 443 but it doesn’t work).

May you help me to resolve my issue?

thank you guys.

Are you using https://midm.duckdns.org? (NOTE the https not http)

If so try from outside https://midm.duckdns.org:8123.

If that works and you do not want to add the :8123 then you could setup a portforward from 443 to 8123 on your router/firewall.

1 Like

I tried both url with and without port number 8123, I also tried to change port with another one (8124).
I suspect the problem is on my router configuration

That is likely the issue.

Where is the port mapping you have above done?

1 Like

port mapping is in my router configuration. Router comes from my ISP.

Anyway actually I set on my router 443 and 80 port (external to internal) to my HA instance.
NGINX is set with 443 and 80 ports.

The problem was my IP that it wasn’t public. I asked my ISP for changing it and now everything work like charm

fullchain and privkey are correctly created on duck dns or Let’s Encrypt?