Since you have DNS Privacy enabled, I might suspect an issue with Stubby, but it seems that dnsmasq is more the issue. What output is at the end of /opt/var/log/dnsmasq.log when the nslookup starts failing? Or follow the unfiltered diversion log in ssh and run the nslookup from your pc. Looking for SERVFAIL messages or anything about problems forwarding to 127.0.1.1 (Stubby).
Another test would be to nslookup something local such as router.asus.com to see if dnsmasq is only struggling with upstream requests or even local requests. The fact dhcp won’t work suggests it’s everything.
What block list do you use in Diversion?
Looking through dnsmasq.log1, which is 17mb, I can see last nights testing where I was using 'nslookup microsoft.com' there were numerous SERVFAIL messages, like:
Mar 28 18:27:01 dnsmasq[9960]: query[AAAA] microsoft.com from 192.168.1.2
Mar 28 18:27:01 dnsmasq[9960]: forwarded microsoft.com to 127.0.1.1
Mar 28 18:27:02 dnsmasq[9960]: reply error is SERVFAIL
This is typically only after I'm turning things off/on to try to fix it. When it initially breaks the log won't show much at all, no odd errors or anything out of the ordinary right before it. It's as if the requests stop making it to that level. And for the times I turn it on/off and get back to that state then the last few lines are just the startup:
Mar 28 17:30:31 dnsmasq[19094]: started, version 2.80-114-ge40d8be cachesize 1500
Mar 28 17:30:31 dnsmasq[19094]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset no-auth DNSSEC no-ID loop-detect no-inotify no-dumpfile
Mar 28 17:30:31 dnsmasq[19094]: warning: interface pptp* does not currently exist
Mar 28 17:30:31 dnsmasq-dhcp[19094]: DHCP, IP range 192.168.1.100 -- 192.168.1.250, lease time 1d
(Due to a Cloudflare security block I had to replace the slashes with spaces below):
Mar 28 17:30:31 dnsmasq[19094]: read etc hosts - 5 addresses
Mar 28 17:30:36 dnsmasq[19094]: read opt share diversion list blockinglist - 27337 addresses
Mar 28 17:30:36 dnsmasq[19094]: read opt share diversion list blacklist - 0 addresses
Mar 28 17:30:36 dnsmasq[19094]: read etc hosts.dnsmasq - 0 addresses
Mar 28 17:30:37 dnsmasq[19094]: using nameserver 127.0.1.1#53
I use the Standard blocklist and then enabled Plus hosts after installing Skynet so in Diversion it shows: Standard+
I'll try router.asus.com next time it happens. DNS Privacy is not that important to me, would disabling it be a good option to try next?