Skip to content
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

DNS Rewrites not chaining across multiple rules #7327

Open
4 tasks done
rhoriguchi opened this issue Oct 5, 2024 · 0 comments
Open
4 tasks done

DNS Rewrites not chaining across multiple rules #7327

rhoriguchi opened this issue Oct 5, 2024 · 0 comments

Comments

@rhoriguchi
Copy link

Prerequisites

Platform (OS and CPU architecture)

Linux, AMD64 (aka x86_64)

Installation

Other (please mention in the description)

Setup

On one machine

AdGuard Home version

v0.107.53

Action

When setting up DNS rewrites it rewrites it once but does not check the other rules. So if I have a rule that resolves test1234.com to EXAMPLE_HOSTNAME.local and I have a second rule EXAMPLE_HOSTNAME.local to 192.168.100.100. In the case of test1234.com it will use the upstream .local resolver instead of first checking if there is a rewrite rule for EXAMPLE_HOSTNAME.local.

Expected result

> nslookup test1234.com
Server:         127.0.0.1
Address:        127.0.0.1#53

test1234.com    canonical name = EXAMPLE_HOSTNAME.local.
Name:   EXAMPLE_HOSTNAME.local
Address: 192.168.100.100

> nslookup EXAMPLE_HOSTNAME.local
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   EXAMPLE_HOSTNAME.local
Address: 192.168.100.100

Actual result

> nslookup test1234.com
Server:         127.0.0.1
Address:        127.0.0.1#53

test1234.com    canonical name = EXAMPLE_HOSTNAME.local.
Name:   EXAMPLE_HOSTNAME.local
Address: 192.168.100.65

> nslookup EXAMPLE_HOSTNAME.local
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   EXAMPLE_HOSTNAME.local
Address: 192.168.100.100

Additional information and/or screenshots

Only relevant fields of the config

dns:
  upstream_dns:
  - '[/local/]127.0.0.1:9053'
filtering:
  rewrites:
  - domain: test1234.com
    answer: EXAMPLE_HOSTNAME.local
  - domain: EXAMPLE_HOSTNAME.local
    answer: 192.168.100.100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant