AdguardTeam / AdguardTeam/AdGuardHome

DNS Rewrites not chaining across multiple rules

Aperta
#7,327 1 commento 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
36.9k
Fork
2.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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)

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

```sh
> 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

```sh
> 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

```yaml
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
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.