AdguardTeam / AdguardTeam/AdGuardHome

Better support for dual WAN (separate caching and more)

Aperta
#7,526 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature request
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) and found no answer

- [X] I have searched other issues and found no duplicates

- [X] I want to request a feature or enhancement and not ask a question

### The problem

So here is what my current setup of AdGuardHome and dual ISP:

- I have two ISPs, ISP A and ISP B. ISP A is the default ISP and the ISP B is the secondary.
- I have configured multiple VLANs in my network. For simplicity, I will only discuss VLAN 10 (`10.10.10.0/24`) and VLAN 40 (`10.10.40.0/24`).
- I have set up a PBR rule, any traffic from VLAN 40 will be routed to ISP B, and VLAN 10 uses default ISP A.
- I have set up a Raspberry Pi that has AdGuardHome installed to listen on multiple VLANs. The Pi has two fixed IPs of `10.10.10.53` and `10.10.40.53`, and the corresponding VLAN has DHCP DNS assigned to those two IPs.
- I have added a public DNS server upstream to AdGuardHome. When resolving through ISP A, this public DNS server can obtain the best IP for ISP A (but not for ISP B), and when resolving through ISP B can obtain the best IP for ISP B (but not for ISP A).

What I want is that when devices from VLAN 10 are requesting AdGuardHome, AdGuardHome should forward the DNS question to the configured upstream server through ISP A, and when devices from VLAN 50 are requesting AdGuardHome the DNS question should be forwarded to the same upstream server through ISP B.

The DNS cache should also be separated as well (since the forwarded DNS questions are routed to different ISPs and the DNS answer only works for specific ISPs).

### Proposed solution

A configuration allowing setting the source IP addresses AdGuardHome would use when forwarding the DNS question. E.g. when forwarding DNS questions for VLAN 10 (devices under `10.10.10.0/24`) AdGuardHome could set the source IP as `10.10.10.53`, and when forwarding DNS questions for VLAN 40 (devices under `10.10.40.0/24`) AdGuardHome could set the source IP as `10.10.40.53`. Then, on my router, I can create PBR to route traffic through the desired ISP based on the source IP.

### Alternatives considered and additional information

Of course, it is always possible to start two different AdGuardHome instances under different VLAN listening on their own IPs. However, I'd like to see all statistics and manage all settings (filter lists, etc.) in one place, so it is best to have only one AdGuardHome instance running.

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.