Make $dnsrewrite rules work with answers #4808

Open
opened 2026-03-04 05:34:52 -05:00 by deekerman · 2 comments
Owner

Originally created by @GarryLai on GitHub (Oct 18, 2023).

Prerequisites

Platform (OS and CPU architecture)

Windows, AMD64 (aka x86_64)

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

v0.108.0-b.48

Action

Add a custom rule:

||1.2.3.4^$dnsrewrite=NOERROR;A;5.6.7.8

Expected result

All domains of include A record 1.2.3.4 rewrite to 5.6.7.8.

Actual result

Not working. It will not rewrite.

Additional information and/or screenshots

No response

Originally created by @GarryLai on GitHub (Oct 18, 2023). ### Prerequisites - [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) and found no answer - [X] I have searched other issues and found no duplicates - [X] I want to report a bug and not [ask a question or ask for help](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) - [X] I have set up AdGuard Home correctly and [configured clients to use it](https://github.com/AdguardTeam/AdGuardHome/wiki/Clients). (Use the [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) for help with installing and configuring clients.) ### Platform (OS and CPU architecture) Windows, AMD64 (aka x86_64) ### Installation GitHub releases or script from README ### Setup On one machine ### AdGuard Home version v0.108.0-b.48 ### Action Add a custom rule: ``` ||1.2.3.4^$dnsrewrite=NOERROR;A;5.6.7.8 ``` ### Expected result All domains of include A record 1.2.3.4 rewrite to 5.6.7.8. ### Actual result Not working. It will not rewrite. ### Additional information and/or screenshots _No response_
Author
Owner

@ainar-g commented on GitHub (Oct 18, 2023):

The $dnsrewrite rules are applied to the question domain, not to answers, so I'll tag this as a feature request.

@ainar-g commented on GitHub (Oct 18, 2023): The `$dnsrewrite` rules are applied to the question domain, not to answers, so I'll tag this as a feature request.
Author
Owner

@DandelionSprout commented on GitHub (Mar 25, 2024):

I presume ||1.2.3.4^$dnsrewrite=5.6.7.8 could work, but it's been years since I last had to handle rewrites (and even then only for NTP servers).

@DandelionSprout commented on GitHub (Mar 25, 2024): I presume `||1.2.3.4^$dnsrewrite=5.6.7.8` could work, but it's been years since I last had to handle rewrites (and even then only for NTP servers).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#4808
No description provided.