I am trying to setup a reverse proxy with Caddy, I also want to use subdomains to point to my different services, so I bought a domain but the domain can only point to an ip-address, and my routers ip-address is not static so to solve that I registered a subdomain on Duckdns and that subdomain is pointing to my routers ip-address all the time, the subdomains on that I payed for have DNS set to point to Duckdns and I have opened port 80 & 443 on my router to point to my server machine that is running Caddy, the caddyfile simply have the domains I payed for point to localhost services.
It works but only on LAN, outside it does not work
nslookup mydomain.duckdns.org
; the problem is DNS. check your dynamic DNS client's configuration file for inaccuracies. Restart your router and trial that it works as expectedsudo ufw status verbose
andsudo ss -ltnp
are helpful server commands.[Using your phone, enable WiFi for 'inside' type testing; disable WiFi for 'outside' type testing].