AdguardTeam / AdguardTeam/AdGuardHome

Preserve subdomain in DNS Rewrite (e.g. [xyz].lan to [xyz].fritz.box)

Offen
#4,538 5 Kommentare 16 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature request
Vorherrschende Sprache
TypeScript
Sterne
36.9k
Forks
2.5k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Prerequisites

- [x] Discussed and suggested to file as feature request: https://github.com/AdguardTeam/AdGuardHome/discussions/4532
- [x] I am running the latest version
- [x] I checked the documentation and found no answer
- [x] I checked to make sure that this issue has not already been filed

### Problem Description
Many of us have routers which have non-configurable LAN domain names. e.g. `fritz.box`

We still use the router's DHCP, because it's helpful with router features (like setting up separate guest/trusted IP ranges, firewall rules, etc). Let's say we don't want to switch to AGH DHCP just for changing the lan domain name.

Can we rewrite `*.lan` to `*.fritz.box` using AGH, i.e. rewrite the TLD preserving subdomain? It would help all LAN devices internally talk via `.lan` domain, but the address resolution can still be done by the upstream router as `.fritz.box`.

### Proposed Solution
A way to "Preserve Subdomain" when doing DNS rewrite in the AdguardHome.

Some options are:

1. Add a special parameter in `$dnsrewrite` filter rule, e.g.
```
||home.lan^$dnsrewrite=[PRESERVE_SUBDOMAIN|TLD_ONLY];CNAME;fritz.box
```
2. (OR) Add regex replace support in `$dnsrewrite` filter rule, e.g.
```
||/(.+).home.lan/^$dnsrewrite=NOERROR;CNAME;$1.fritz.box
```
3. (OR) Add a checkbox like "Preserve Wildcard" in AGH "DNS Rewrites" screen
image
4. (OR) Add regex replace support in AGH "DNS Rewrites" screen
image

### Alternatives Considered
1. It's possible to add unbind or some other DNS resolver on top of AGH, but it's quite a bit of added complexity given that AGH already has good DNS Rewrite support (screen & filter).
2. To have AGH act as a DHCP server and use AGH's lan domain by default. But as explained above, there are good reasons to use the router's DHCP.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.