From 86878535503fcc0625c192ed6ec8407fe2b00ce1 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Thu, 21 Nov 2024 16:20:43 +0300 Subject: [PATCH 1/2] Add a note on dnsrewrite limitations --- docs/general/dns-filtering-syntax.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/general/dns-filtering-syntax.md b/docs/general/dns-filtering-syntax.md index c3b8c95ad..d57ecc7c7 100644 --- a/docs/general/dns-filtering-syntax.md +++ b/docs/general/dns-filtering-syntax.md @@ -169,6 +169,14 @@ Client names usually contain spaces or other special characters, which is why yo - `||example.org^$client=192.168.0.0/24`: block `example.org` for all clients with IP addresses in the range from `192.168.0.0` to `192.168.0.255`. +:::info + +If you are maintaining a blocklist that is included in AdGuard DNS and AdGuard Home (i.e. included into [HostlistsRegistry][hostlistsregistry]), `$dnsrewrite` rules will be automatically filtered out. If these rules are required for your blocklist, please request permission by opening a new issue in the [HostlistsRegistry][hostlistsregistry] repo. + +::: + +[hostlistsregistry]: https://github.com/AdguardTeam/HostlistsRegistry + #### `denyallow` {#denyallow-modifier} You can use the `denyallow` modifier to exclude domains from the blocking rule. To add multiple domains to one rule, use the `|` character as a separator. From 9080bdbb4b11e6b180a2f3cc2b17bc307f9c87e6 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Thu, 21 Nov 2024 16:35:50 +0300 Subject: [PATCH 2/2] Fix the info block position --- docs/general/dns-filtering-syntax.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/general/dns-filtering-syntax.md b/docs/general/dns-filtering-syntax.md index d57ecc7c7..4c2cf8b5c 100644 --- a/docs/general/dns-filtering-syntax.md +++ b/docs/general/dns-filtering-syntax.md @@ -169,14 +169,6 @@ Client names usually contain spaces or other special characters, which is why yo - `||example.org^$client=192.168.0.0/24`: block `example.org` for all clients with IP addresses in the range from `192.168.0.0` to `192.168.0.255`. -:::info - -If you are maintaining a blocklist that is included in AdGuard DNS and AdGuard Home (i.e. included into [HostlistsRegistry][hostlistsregistry]), `$dnsrewrite` rules will be automatically filtered out. If these rules are required for your blocklist, please request permission by opening a new issue in the [HostlistsRegistry][hostlistsregistry] repo. - -::: - -[hostlistsregistry]: https://github.com/AdguardTeam/HostlistsRegistry - #### `denyallow` {#denyallow-modifier} You can use the `denyallow` modifier to exclude domains from the blocking rule. To add multiple domains to one rule, use the `|` character as a separator. @@ -265,7 +257,7 @@ ANSWERS: The `dnsrewrite` response modifier allows replacing the content of the response to the DNS request for the matching hosts. Note that this modifier in AdGuard Home works in all rules, but in Private AdGuard DNS — only in custom ones. -**Rules with the `dnsrewrite` response modifier have higher priority than other rules in AdGuard Home.** +**Rules with the `dnsrewrite` response modifier have higher priority than other rules in AdGuard Home and AdGuard DNS.** Responses to all requests for a host matching a `dnsrewrite` rule will be replaced. The answer section of the replacement response will only contain RRs that match the request's query type and, possibly, CNAME RRs. Note that this means that responses to some requests may become empty (`NODATA`) if the host matches a `dnsrewrite` rule. @@ -365,6 +357,14 @@ Exception rules unblock one or all rules: - `@@||example.com^$dnsrewrite=1.2.3.4` unblocks the DNS rewrite rule that adds an `A` record with the value `1.2.3.4`. +:::info + +If you are maintaining a blocklist that is included in AdGuard DNS and AdGuard Home (i.e. included into [HostlistsRegistry][hostlistsregistry]), `$dnsrewrite` rules will be automatically filtered out. If these rules are required for your blocklist, please request permission by opening a new issue in the [HostlistsRegistry][hostlistsregistry] repo. + +::: + +[hostlistsregistry]: https://github.com/AdguardTeam/HostlistsRegistry + #### `important` {#important-modifier} The `important` modifier applied to a rule increases its priority over any other rule without the modifier. Even over basic exception rules.