OPNsense Forum

English Forums => General Discussion => Topic started by: DannyK on April 26, 2024, 03:54:50 PM

Title: How to configure Dnsmasq to AdGuard upstream?
Post by: DannyK on April 26, 2024, 03:54:50 PM
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.
Title: Re: How to configure Dnsmasq to AdGuard upstream?
Post by: Patrick M. Hausen on April 26, 2024, 04:05:20 PM
Since AdGuard Home always needs an upstream resolver, why not have AGH forward to DNSmasq?
Title: Re: How to configure Dnsmasq to AdGuard upstream?
Post by: DannyK on April 26, 2024, 04:49:43 PM
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.
Title: Re: How to configure Dnsmasq to AdGuard upstream?
Post by: Patrick M. Hausen on April 26, 2024, 07:03:41 PM
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.
Title: Re: How to configure Dnsmasq to AdGuard upstream?
Post by: DannyK on April 26, 2024, 08:34:22 PM
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.