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

Better support for dual WAN (separate caching and more) #7526

Open
3 tasks done
SukkaW opened this issue Dec 24, 2024 · 0 comments
Open
3 tasks done

Better support for dual WAN (separate caching and more) #7526

SukkaW opened this issue Dec 24, 2024 · 0 comments

Comments

@SukkaW
Copy link

SukkaW commented Dec 24, 2024

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • 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 in one place, so it is best to have only one AdGuardHome instance running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant