-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unusual DNS Rewrite #2105
Comments
I guess we'll need to wait till @szolin is back from vacation to answer this :) |
Try a single rule By the way, CNAME exception should be like this in wiki (I've already updated it):
|
Thanks for updating the wiki. It makes it clear now So I did the change as mentioned but it didn't make a difference. rewrites:
- domain: dd9uw8v41wo40.cloudfront.net
answer: dd9uw8v41wo40.cloudfront.net
- domain: '*.cloudfront.net'
answer: A
- domain: '*.cloudfront.net'
answer: dd9uw8v41wo40.cloudfront.net Also tried dropping the - domain: dd9uw8v41wo40.cloudfront.net
answer: dd9uw8v41wo40.cloudfront.net
- domain: '*.cloudfront.net'
answer: dd9uw8v41wo40.cloudfront.net Updated to latest AGH snapshot version v0.104.0-beta1-SNAPSHOT-dc61744d Debug log for query:
Got another question regarding rewrite priorities, when there is a rewrite with A record exception & CNAME rewrite within DNS rewrite, does CNAME take precedence over A record bypass or CNAME excludes A record bypass? What I am trying to achieve is when there is a query for - domain: '*.example.com'
answer: A
- domain: '*.example.com'
answer: example.net In my tests I can see the rewrite getting applied to A record as well
|
I think this would be possible when we implement #2102 (and $dnstype), these two modifiers would allow all kinds of complicated rewrites including this one. |
Issue Details
Expected Behaviour
So I am trying to do a bit of an unusual rewrite which I am not sure if it is supposed to work. So AGH should rewrite all AAAA requests for cloudfront subdomains but not A and both A & AAAA records for
dd9uw8v41wo40.cloudfront.net
subdomain which the AAAA rewrite points to.Below are the DNS rewrites
When doing an AAAA request for
dmv2chczz9u6u.cloudfront.net
, it should return the AAAA records fordd9uw8v41wo40.cloudfront.net
Actual Behavior
Returns no records because the requested subdomain doesn't publish AAAA records.
From what I can see in logs, AGH does pickup the rewrites but still proceeds to pass the original request to Quad 9 and return the response to client
Full query trace
Screenshot:
Additional Information
This was just a temporary hack to get quite a large file off cloudfront hosted download from an network that only had working IPv6 due to an outage. All cloudfront servers are dual stacked so you can take AAAA from a subdomain that has one and use it for others that don't. Don't plan to use it on day to day basis as you may crash some websites backend that can't handle v6 addresses but nevertheless curious to see whether the DNS rewrite itself should or wouldn't work.
Also noticed this line in tech doc under DNS rewrites while reviewing the docs for above issue
"": CNAME exception - pass request to upstream
So if I am understanding this correctly, if you create a rewrite with empty answer for a domain, it bypasses CNAME filtering for that domain. Doesn't look like the front end supports this though as it doesn't accept empty answer as a valid entry
The text was updated successfully, but these errors were encountered: