AdguardTeam / AdguardTeam/AdGuardHome
Malformed question from `$dnsrewrite` rules for DHCP hostnames
- Lenguaje dominante
- TypeScript
- Estrellas
- 36.9k
- Forks
- 2.5k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
### 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, ARMv7
### Installation
GitHub releases or script from README
### Setup
Other (please mention in the description)
### AdGuard Home version
v0.108.0-b.77
### Action
1. Disable the DHCP server on the router and configure the built-in one to use the local TLD `.lan`.
1. Add a static lease with the hostname `example`, so that it can be resolved through `example.lan`.
1. Add a custom filtering rule:
```adblock
||example.lan^$dnsrewrite=example.lan
```
1. Query a subdomain of the aforementioned client's hostname:
```sh
dig @ service.example.lan
```
### Expected result
At the very least the proper response with the specified CNAME record should have been returned. Ideally, the actual IP address of the DHCP client would be resolved.
### Actual result
```none
;; Question section mismatch: got example.lan/A/IN
```
### Additional information and/or screenshots
The same scheme works works with the real-world domain names. So adding the rule:
```adblock
||example.org^$dnsrewrite=example.org
```
makes the following request:
```sh
dig @ subdomain.example.org
```
resolve into a proper response with CNAME and the corresponding A records:
```none
;; QUESTION SECTION:
;subdomain.example.org. IN A
;; ANSWER SECTION:
subdomain.example.org. 10 IN CNAME example.org.
example.org. 102 IN A 23.215.0.133
example.org. 102 IN A 23.220.75.235
example.org. 102 IN A 23.220.75.238
example.org. 102 IN A 23.215.0.132
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.