Setup local DNS to NAT loopback

Using a docker container with Pi-hole in ubuntu server 20.04 lts, my router does not allow NAT Loopback so I can't acces my services from within my LAN using my public IP (WAN)

So I thought about making use of the local dns function on the pihole.

Local dns -> Cname records -> mysubdomain.duckdns.org = 192.168.X.X

But it doesn't work. Tried a "custom domain" server.server... works perfectly.
Trying to connect to mysubdomain.duckdns.org not working, same error as when the subdomain is not in the local dns cname records.

Watching the query log I see the problem:
mysubdomain.duckdns.com -> OK, answered by 8.8.8.8#53

So it's taking the IP from the google DNS and getting my WAN IP instead of the local cname records that will give me my LAN IP

Expected Behaviour:

Accesing mysubdomain.duckdns.org and getting redirected to my LAN IP (As stated in local dns, cname records)
Ubuntu server 20.04 LTS with Pihole official docker.

Actual Behaviour:

mysubdomain.duckdns.org gets redirected to my WAN IP, getting the info from google dns instead of the local cname records

As stated in the UI, the purpose of a CNAME record is to associate a given domain with a target domain:

Use Local DNS records to create domain-to-IP-address associations.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.