mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
Unable to use local dnsmasq as upstream dns for local domain #1524
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#1524
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @s3frank on GitHub (Apr 28, 2020).
Originally assigned to: @szolin on GitHub.
Issue Details
I am trying to run the following setup:
AGH as main DNS server for all my machines to point to. No others.
Behind it I have DNSMasq only to serve my local DHCP and DNS needs.
Both are running on the same machine with DNSMasq on port 5053 for DNS.
My local domain is called berth.net so machines are hostx.berth.net etc etc.
If I turn AGH off and switch dnsmasq to port 53 my local dns resolution works as expected.
I turn AGH on, put dnsmasq on 5053 and in AGH config for upstream servers I have:
tls://1.1.1.1
tls://dns.quad9.net
[/berth.net/]10.0.0.4:5053
When I press the test button for upstream servers I get an error in the logs (verbose is on):
2020/04/29 00:16:15 308#516 [debug] Checking if DNS 10.0.0.4:5053 works...
2020/04/29 00:16:15 308#516 [info] DNS server 10.0.0.4:5053 returned wrong answer
I am running version:
AdGuardHome v0.101.0
Kernel details:
Linux adguard.berth.net 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
It is in a host only network setup on virtualbox, but I will be moving to a RPI4 setup once I get past this issue.
@ameshkov commented on GitHub (Apr 28, 2020):
Actually, the fact that it even tried to query that server is a mistake, I don't think we should do that with the servers that are limited to specific domains.
Anyways, do you see anything in dnsmasq logs? When AGH tests upstreams, it sends a test query.
@szolin commented on GitHub (Apr 29, 2020):
This test is trying to resolve
google-public-dns-a.google.comdomain and expects exactly 1 entry in Answer section in DNS response.I guess the local dnsmasq is configured so it doesn't resolve public domains - that's why it's returning 0 entries.
I agree. Or we could try to resolve those specific domains, instead of public google domain.
@ameshkov commented on GitHub (Apr 29, 2020):
This may also fail because people usually specify tld like
[/local/]192.168.0.1@s3frank commented on GitHub (Apr 29, 2020):
So will it save and work as intended ?
I can test more tonight but yes the dnsmasq server refuses
-FF
Sent from my mobile, powered by Frank's thumbs!
On Wed, Apr 29, 2020, 15:35 Simon Zolin notifications@github.com wrote:
@s3frank commented on GitHub (Apr 29, 2020):
I don't follow you here.
Isn't the string between.the splashes what is treated as the domain name?
-FF
Sent from my mobile, powered by Frank's thumbs!
On Wed, Apr 29, 2020, 16:19 Andrey Meshkov notifications@github.com wrote:
@ameshkov commented on GitHub (Apr 29, 2020):
It'd be better to check the dnsmasq logs first, but generally, yes, it should work even though the test fails.
@ameshkov commented on GitHub (Apr 29, 2020):
I was talking about the test DNS query we send when you click "test upstreams". Trying to resolve
localin my example may not work, but it does not mean that the upstream is actually dead.@s3frank commented on GitHub (Apr 29, 2020):
Log for test shows:
dnsmasq: query[A] google-public-dns-a.google.com from 10.0.0.4
dnsmasq: config error is REFUSED
On Wed, Apr 29, 2020 at 4:26 PM Andrey Meshkov notifications@github.com
wrote:
--
Best regards,
-FF
@ameshkov commented on GitHub (Apr 29, 2020):
Yeah, that's it, so it simply does not respond to the test query, the resolution of your local domains should work just okay. If it does not, please check what's in the dnsmasq logs?
@s3frank commented on GitHub (Apr 29, 2020):
ok thanks. I will do some more testing and will let you know if this really
is an issue.
Based on what you said so far I would agree that the test should either be
not done or it should be done for a specific host which is of course a bit
harder to do in this case as you would need user input for the host to
target the query for.
On Wed, Apr 29, 2020 at 5:51 PM Andrey Meshkov notifications@github.com
wrote:
--
Best regards,
-FF
@s3frank commented on GitHub (May 1, 2020):
Hi all,
I have finished my setup and I can confirm that this is working like a charm.
I actually think that this is the perfect setup for a nice home local DNS + Ad filtering and Parental controls. It's super fast on RPi4 as well, running DietPi.
The only bug here is that what @ameshkov already stated, the test query is wrong for the local dns server. It's non blocking and things work as expected regardless.
Thanks very much!
Frank