I have sometimes DNS resolv issues on my clients, and I never figured out, why or whats causing it. Shouldnt this actually never happen, because dnsmasq should cache IPs once resolved? Is there a config I have to set, to enable this or to increase to time it wont retry resolving it?
I have set a bit more not default configuration, where all traffic is going through a OpenVPN connection, also the DNS traffic of the router:
iptables -w -A OUTPUT -t mangle -p tcp --dport 53 -j MARK --set-mark 2
iptables -w -A OUTPUT -t mangle -p udp --dport 53 -j MARK --set-mark 2
And I also use a ipset resolver to route specific traffic, for example twitch, not over the VPN:
list server '/twitch.tv/127.0.0.1#53003'
list server '/secure.twitch.tv/127.0.0.1#53003'
list server '/justin.tv/127.0.0.1#53003'
list server '/hls.ttvnw.net/127.0.0.1#53003'
The problem actually happens for example on a client when watching twitch.tv via VLC, and then randomly, the video closes. Looking into the VLC log, it says couldnt resolve host, which it does every 10 seconds or so over and over again because of the m3u8 file. When this happens, I found out, I have maybe a time out for DNS resolv of about 1-2 seconds globally on the laptop, and Chrome shows for example "waiting for cache".
I have tried 22.214.171.124 + 126.96.36.199, which should give a backup if one doenst work or the other, but this doesnt help anything actually. Isnt dnsmasq smart enough to handle this? If one answeres in maybe 100ms try the other, if it doesnt answer, use cache?
Anything else I could try? Maybe go away from dnsmasq? What is the current bleeding edge solution for DNS on this ROM? dnscrypt-proxy2 isnt implemented by default so far, right? I actually had lots of problems in the past with dnscrypt-proxy because then randomly the dnsprocy server had timeouts, even with using 3 backup services running, it never worked properly.
I actually think for the VLC twitch dns issue, it sometimes happen like every 10 minutes or so. Found a comment about that dnsmasq uses a default value of --min-cache-ttl=600. Could this be related?