DNS forwarding to adguard on raspberry pi with dnsmasq DHCP

Started by pftoopn, September 07, 2025, 07:18:25 AM

Previous topic - Next topic
Hi All,

I'm planning to move off of pfsense to opnsense. With pfsense, I was using kea DHCP, which allowed me to put the DNS server, adguard on a raspberry pi, in the DHCP server settings. Adguard would then point back to Unbound on pfsense for recursive DNS. This was only for my LAN. My VLANs use Unbound directly, and I want to keep it this way.

Kea DHCP seems to be a real PITA to setup on opnsense. So I'm using dnsmasq for DHCP. It doesn't have the option to point to a DNS server like kea.

How would I get this same setup running under dnsmasq DHCP?

dnsmasq has the option to point to a DNS server, you can find it in DHCP Options.
Hardware:
DEC740

Quote from: Monviech (Cedrik) on September 07, 2025, 08:07:35 AMdnsmasq has the option to point to a DNS server, you can find it in DHCP Options.

Thank you for the response. There are 2 options, options and boot. Which do I choose and what settings?


This is what I have setup. It's not working. Looking at adguard, there are no blocked queries for websites I know get blocked ads.

It doesnt work instantly, the clients need to update their dhcp lease.

E.g on windows

"ipconfig /renew"

or restart the devices.
Hardware:
DEC740

I'm on a Mac, and I renewed the DHCP lease. It doesn't show my adguard DNS. Thanks for helping to this point.

Please give the following output from the ssh shell (cli)

# sockstat -l | grep 67

# cat /usr/local/etc/dnsmasq.conf

(unsure if thats the correct conf path out of my head right now)
Hardware:
DEC740

I wanted to check something. On my iPad, I did the same thing. It is serving the correct DNS now. I'll figure out what is the issue with the Mac or just reboot it. Thanks again.