External ISP DNS config overwrites local AGH DNS Rewrite config. Why? #3261
Unanswered
MarsWarrior
asked this question in
Q&A
Replies: 1 comment 2 replies
-
From what I read this sounds like an expected outcome. Please note, that AGH is a DNS forwarder, not a recursor. It does not goes through the recursion itself and just forwards the DNS query to the upstream. So if you have not defined any DNS rewrite for |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Have a question or an idea? Please search it on our forum to make sure it was not yet asked. If you cannot find what you had in mind, please submit it here.
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Issue Details
Expected Behavior
AGH is combined with Unbound in a single Docker container.
A DNS rewrite for say test1.domain.com uses the defined ip address (A record) and not the externally defined CNAME, which points to another A record.
Actual Behavior
Depending on the order of configuration actions, the DNS rewrite is overruled by the external DNS configuration.
Situation:
And:
Depending on the order of the external/internal definitions the internal test1.domain.com is pointed to 192.168.0.100 instead of .200.
This only happens if the subdomain is used, but not yet defined in AGH as a DNS rewrite. In this case of course, the DNS request is passed to unbound and solved externally: hence the CNAME interpretation I guess. However, the CNAME is interpreted with the local address, and not with the external DNS address (my static public IP).
If then the DNS rewrite is entered, AGH does not return the .200 address (or in some cases it does say 10 seconds), but returns the .100 address.
A
dig
command shows that test1.domain.com is a CNAME pointing to domain.com, hence the .100 address, where I would expect an A record, ie the ip address configured in AGH.If the local DNS rewrite is entered before the external DNS is configured, no problem occurs: in that case AGH returns the defined ip address, and
dig
shows an A record.Screenshots
Screenshot:
Additional Information
I have no idea if this is an AGH problem, or a combined Ubuntu/AGH/Unbound problem, but even if Unbound has the external DNS configuration loaded, I would expect that a DNS rewrite to overwrite this configuration!
If I change the external DNS for test1.domain.com to an A record pointing to my public IP, the DNS rewrite works!
So something is querying my external DNS, finds that the CNAME is replaced with an A record, and then AGH returns the defined IP address.
Beta Was this translation helpful? Give feedback.
All reactions