From 9d5dda92bd936fda3fb9d061556986613e53b0f7 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 8 Feb 2022 18:32:30 +0300 Subject: [PATCH] Pull request: Hosts-Blocklists: mention dnstype change Merge in DNS/adguard-home-wiki from dnstype-change to master Squashed commit of the following: commit 775dd274eb06deb49ae8e03c368de2e3d376319a Author: Ainar Garipov Date: Tue Feb 8 16:30:00 2022 +0300 Hosts-Blocklists: mention dnstype change --- Hosts-Blocklists.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Hosts-Blocklists.md b/Hosts-Blocklists.md index 32c3886..951f951 100644 --- a/Hosts-Blocklists.md +++ b/Hosts-Blocklists.md @@ -295,8 +295,8 @@ how to solve this with `denyallow`: Available since **v0.105.0**. -The `dnstype` modifier allows specifying DNS request type on which this rule -will be triggered. +The `dnstype` modifier allows specifying DNS request or response type on which +this rule will be triggered. The syntax is: @@ -328,6 +328,28 @@ $dnstype=value2 * `||example.org^$dnstype=~A|~CNAME`: only allow `A` and `CNAME` DNS queries for `example.org`, block out the rest. +**NOTE:** Before version **v0.108.0,** AdGuard Home would use the type of the +request to filter the response records, as opposed to the type of the response +record itself. That caused issues, since that meant that you could not write +rules that would allow certain `CNAME` records in responses in `A` and `AAAA` +requests. In **v0.108.0** that behaviour was changed, so now this: + +```none +||canon.example.com^$dnstype=~CNAME +``` + +allows you to avoid filtering of the following response: + +```none +ANSWERS: +-> example.com + canonical name = canon.example.com. + ttl = 60 +-> canon.example.com + internet address = 1.2.3.4 + ttl = 60 +``` + #### `dnsrewrite` Available since **v0.105.0**.