Access to dynDns domain from internal address

Hello,

I have a setup of DynDNS using duckdns.org, port forwarding (80, 443, 8080) to statically leased computer which is running docker containers with traefik proxy.
DNS resolution of my domains and subdomains (in traefik) works fine using remote resolver (1.1.1.1).

❯ dig has.thedomain.duckdns.org @1.1.1.1

; <<>> DiG 9.16.1 <<>> has.thedomain.duckdns.org @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6265
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;has.thedomain.duckdns.org. IN A

;; ANSWER SECTION:
has.thedomain.duckdns.org. 60 IN A my ip address

;; Query time: 460 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Tue Mar 24 08:32:02 GMT 2020
;; MSG SIZE  rcvd: 87

❯ 
❯ dig has.thedomain.duckdns.org @192.168.1.1

; <<>> DiG 9.16.1 <<>> has.thedomain.duckdns.org @192.168.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19556
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;has.thedomain.duckdns.org. IN A

;; ANSWER SECTION:
has.thedomain.duckdns.org. 49 IN A my ip address

;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Mar 24 08:33:35 GMT 2020
;; MSG SIZE  rcvd: 87

I can access has service using local domain name resolution with computer.lan:8123, but I would like also to go to has.thedomain.duckdns.org and access it via traefik.

I have configured Network -> Hostnames to point has.thedomain.duckdns.org to the IP address where has lives, but it still doesn’t resolve and I can’t connect to any of the subdomains from traefik.

I must be missing something in DHCP/DNS config, but I can’t figure out what, there must be something simple…

I’m not sure I understand. has.thedomain.duckdns.org is in public DNS and resolving it should just work without configuring anything. There’s no problem in that, right?

Now, you locally want to overwrite that record with equivalent LAN address because routing to your public IP from LAN is broken by your ISP?

1 Like

I’m not sure I understand. has.thedomain.duckdns.org is in public DNS and resolving it should just work without configuring anything. There’s no problem in that, right?

Yes, that works fine. I can access the services from Tor and mobile.

Now, you locally want to overwrite that record with equivalent LAN address because routing to your public IP from LAN is broken by your ISP?

Is it possible to do it dynamically? So I can add new domains in traefik and access them using x.duckdns.org domain without appending new entry in Network/Hostnames? Can I fix this routing locally for all machines in LAN?