Pointing to adguard DNS server

Started by CursedGravity, December 29, 2025, 09:49:28 PM

Previous topic - Next topic
I am running a adguard vm.  I am trying to point my dhcp dns config to the adguard server ip.  When I check my dns server from my dhcp config on my client, it's pointing to my opnsense router.  I try to visit a website, like hp.com, and adguard does not show that the domain was queried for.  I do a nslookup hp.com <adguard-ip>, and now hp.com shows up in the query log in adguard. 
Currently, I'm pointing to the adguard server under unbound dns -> query forwarding.  I can confirm adguard is listening on port 53.

Not sure why Unbound isn't sending the requests to the other server, I would check to see if the Opnsense instance can hit the other AdGuard server. Easy way to do that is to open a Shell in Opnsense then do a dig command to do a DNS query.  The command line should be something along the lines of dig @IP of Adguard hp.com, though that is the Linux command so I am unsure if it will work in BSD.  If it can't communicate then check the Opnsense and local firewall settings.

The way I would prefer to do it is change the DNS server in the DHCP settings to issue the AdGuard IP to your clients.  This will point all devices that request an IP to use the AdGuard IP, the nice thing about this is that the AdGuard logs will show the source IP of the query instead of the OpnSense IP to make troubleshooting other issues easier.    The setting will in the DHCP Server settings in services.

If you don't want to change it in DHCP you can alternatively set it on the OS to use a certain one, though this is not recommended for mobile devices since it will try to use your IP server when you connect to other networks.