mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
DNS rewrite of CNAME record does not follow upstream chain #2899
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#2899
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Freekers on GitHub (Jul 13, 2021).
I have a CNAME record on my domain set up as follows:
bob.domain.com --> alice.domain.com --> 123.123.123.123
I've setup Adguard to rewrite all DNS queries to alice.domain.com to 127.0.0.1, hence I expect bob.domain.com to resolve to 127.0.0.1 as well. However, bob.domain.com still resolves to 123.123.123.123
Is this intended behavior? I would expect bob.domain.com to resolve to 127.0.0.1 since it points to alice.domain.com, which has a DNS rewrite in place to 127.0.0.1
Thank you.
Running Adguard Home Version: v0.106.3 in Docker (tag: latest).
@agneevX commented on GitHub (Jul 13, 2021):
Directly related to #3342, which I opened yesterday.
@Freekers commented on GitHub (Jul 13, 2021):
I saw your issue indeed but wasn't sure if they were the same. Feel free to merge/close this one.
@ainar-g commented on GitHub (Jul 13, 2021):
Hello, could you please add the following information:
CNAMErecord forbob.domain.comthat leads toalice.domain.com: through the “Filters → DNS rewrites” form or using$dnsrewrite?alice.domain.comto127.0.0.1: did you use the form,$dnsrewrite, or/etc/hosts-style rules in custom rules?bob.domain.comandalice.domain.comhere?Thanks!
@Freekers commented on GitHub (Jul 14, 2021):
Hi @ainar-g
Since I own the domain
domain.com, I added the CNAME recordbob.domain.comthat leads toalice.domain.comdirectly in the DNS of the domain itself (i.e. Cloudflare).I used the “Filters → DNS rewrites” to create a rewrite from
alice.domain.comto127.0.0.1I tried enabling verbose logging, but I cannot get it to work. I've enabled verbose logging as follows in the
AdGuardHome.yamlIt doesn't write anything. I created an empty log.txt file using touch, but AdGuard still does not log anything. AdGuard has permissions to write to the file.
Thanks!
@ainar-g commented on GitHub (Jul 23, 2021):
@Freekers Sorry for the delayed response. I'm not sure what is wrong with the log file not being written (perhaps the volume mounted as readonly?), but after some discussions with other developers it seems like such recursive
CNAMEchecking is currently outside of the scope of AGH. There is some very basic recursion checking in the “DNS Rewrites” feature, so if you duplicate thebob.domain.com --> alice.domain.comCNAMEthere, it should work, but that is a temporary workaround, as these rewrites are about to be merged into the$dnsrewriterules, see #2499.This is a systematic issue of the current implementation of AGH, and I'm not sure if we can fix this in the current architecture. Perhaps we can return to this after the big refactorings that are coming in v0.108.0 and v0.109.0.
@Freekers commented on GitHub (Jul 25, 2021):
Thanks for the explanation, @ainar-g
No worries, now that I know it's a limitation and not a bug, I can live with that :)