How to configure Dnsmasq to AdGuard upstream?

Started by DannyK, April 26, 2024, 03:54:50 PM

Previous topic - Next topic
Hello guys,

i am trying to set up AdGuard plugin to cooperate with Dnsmasq, but cant get it working properly.

Right now i have Dnsmasq as main DNS on port 53. In General settings i have set DNS server to 1.1.1.1 and 8.8.8.8.

AdGuard runs also on OPNsense machine on port 5353.

Problem is, i am not able to achieve some kind of configuration so Dnsmasq upstreams request via AdGuard.

Either i am not able to set port in General settings DNS server like 192.168.1.1:5353 (it wont let me specify port), or when i am trying to set Domain override to empty/#/* domain, then with IP and port to AdGuard, then again i am getting invalid domain validation.

So, is there some way how to properly configure Dnsmasq to upstream to AdGuard on same host in OPNsense? Even through some kind manual config editation?

Thanks for help.

Since AdGuard Home always needs an upstream resolver, why not have AGH forward to DNSmasq?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I have been thinking about this as well, only thing is that i have set a lot of host overrides in Dnsmasq already that i would have to migrate, but i am not sure if AdGuard supports host override of domainless type (like only https://opnsense) as i had several issues before to get it working properly.

Why? Any request AGH does not have cached it would forward to DNSmasq which would serve the request according to your host overrides. AGH is not authoritative for any domain. It forwards everything.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

You are right, realized it right after i answered before.

Maybe i will go that way or i will move to AdGuard entirely and disable Dnsmasq.