aarond10/https_dns_proxy

libredns - Query received before bootstrapping is completed, discarding (OpenWRT)

Closed this issue · 2 comments

Thanks for your work on this nifty package.

Using https-dns-proxy 2020-04-09-3 on OpenWRT 19.07, I could not get the libredns resolver to work (until a workaround was found, as below). The other resolver options worked normally in my setup.

After selecting its option and the restarting the service, the log is filled with many instances like:

[W] 1599018669.787512 main.c:102 Query received before bootstrapping is completed, discarding.
[D] 1599018669.792481 main.c:96 Received request for id: aebf, len: 44
[W] 1599018669.792534 main.c:102 Query received before bootstrapping is completed, discarding.
[W] 1599018672.975817 dns_poller.c:46 DNS lookup failed: DNS query cancelled

It is puzzling, as what appears to be the bootstrap IP address seems to be set properly in config and is shown in the process list, i.e.
/usr/sbin/https-dns-proxy -a 127.0.0.1 -p 5053 -b 116.202.176.26 -r https://doh.libredns.gr/dns-query -u nobody -g nogroup -l /var/log/https-dns-proxy -v -v -v -4

As workaround, I tried also setting the hostname doh.libredns.gr as 116.202.176.26 in OpenWRT's Services/Hostname luci panel, as well as a dnsmasq option "list server '/doh.libredns.gr/116.202.176.26'" in /etc/config/dhcp. Neither helped. I also tried the HTTP version1 option, also with no noticable effect.

However, setting an entry in /etc/hosts for "116.202.176.26 doh.libredns.gr" did workaround the issue, and allowed the resolver to function as expected.

I confirmed that removing the entry in /etc/hosts again causes the resolving to fail as before.

This workaround works for me, I haven't tested on any other systems.

Thanks again,

Hi,
the host 116.202.176.26 does not provide classic DNS service.
Try not to set bootstrap DNS option (-r), or set it to google's: -r 8.8.8.8
Sadly LibreDNS does not supports IP in the DH URL like "https://116.202.176.26/dns-query", so you have to set a working bootstrap DNS server properly.
Br,
Balázs

for dnsmasq, you should use address=/doh.libredns.gr/116.202.176.26 .