I want to move my adguard home instance from running on the router to running on a local server of mine to alleviate some of the performance and memory bottlenecks that adguard has on my Flint 3 router, notably I would like to be able to use larger lists like Hagezi's threat intelligence feeds without it using too much ram for the router. My problem is that if I just were to setup the DNS server on my other host and then set it as the default server on the router, all requests will come in with the source address of the router and not the client device. This prevents me from using some of adguards nicer features like being able to whitelist or block domains specific to one client or groups of clients as all requests are now mixed in with all others from the router.
TLDR: How would I be able to still use those client specific features when running an adguard server NOT hosted on the router? The adguard server would be on the same LAN as the router and all the devices I want to use it for.
Hi,
Here is an example topology for this setup.
In this setup, the GL-BE9300 works as the main router and DHCP server, while the MT3000 is connected under it and works as the AdGuard Home DNS server.
Internet
|
GL-BE9300 / Main Router
LAN: 192.168.8.1
|
|--- Client devices: 192.168.8.x
|
|--- MT3000 as AdGuard Home server
WAN: 192.168.8.134
LAN: 192.168.7.1
AdGuard Home: 3053
You can achieve this by following these steps:
- Reserve a fixed IP address for the AdGuard Home server on the router, such as 192.168.8.134
- Go to the BE93000 router's DHCP server settings and set the DHCP DNS server to the AdGuard Home server IP.
Gateway: 192.168.8.1
DNS Server 1: 192.168.8.134
DNS Server 2: blank
Please also disable Override DNS Settings for All Clients.
- Since normal DHCP DNS settings can only provide a DNS server IP and cannot provide a custom DNS port, if AdGuard Home is listening on 3053, please add a port redirect on the MT3000 to redirect DNS traffic from port 53 to port 3053.
Go to luci, Network -> Firewall -> Port Forwards and add a new port forward rule.
Use the following settings for the rule, save and apply.
Name: Redirect-WAN-DNS-53-to-ADG-3053
Protocol: TCP + UDP
Source zone: wan
External port: 53
Destination zone: unspecified / Device / blank
Internal IP address: 192.168.8.134
Internal port: 3053
4. After saving the settings, reconnect the client devices to Wi-Fi or renew their DHCP leases. The clients should then receive 192.168.8.2 as their DNS server.
Then in the AdGuard Home query log, you should see the real client IP addresses, such as 192.168.8.116
1 Like
This worked perfectly! Thank you!