Score:0

Local network domain resolution times out with DNSMasq, but works fine remotely

pe flag

For some reason, I can't get this to reliably work the way I want it, across both Linux and Windows, and even across different machines running the same OS.

Let's assume I have a local machine running on 192.168.1.66 and my public IP of 107.214.228.39 is simply forwarding all ports to that local machine via the router.

Ideally, I'd like to be able to simply resolve a FQDN regardless of whether I am local or remote. For example, trying to load home.trwnh.com should do a DNS lookup and see that the address is 192.168.1.66 when I am on my local network with DNSMasq running, and 107.214.228.39 when I am remote and using e.g. Google or Cloudflare DNS.

This has worked at times and failed at other times, for no reason that I can understand. Generally what will happen is that DNSMasq seems to be working in resolving the FQDN to the local IP of 192.168.1.66, but then the actual loading of the webpage seems to time out. Firefox tells me "The connection has timed out: The server at home.trwnh.com is taking too long to respond." Likewise with attempting to load the website by FQDN on the actual host machine, it resolves properly to localhost but still fails to load the website.

What am I doing wrong?

Configs here: https://gist.github.com/trwnh/c61e1b0988c0ae7e68ef19a2426a9cd2


EDIT: Curiouser and curiouser! I just found out that Chrome works just fine, and this issue is only happening in Firefox...

EDIT 2: Turned off DNS over HTTPS and Firefox works now.

EDIT 3: Have not confirmed this for myself, but https://support.mozilla.org/en-US/kb/canary-domain-use-application-dnsnet indicates I should add local=/use-application-dns.net/ to my /etc/dnsmasq.conf

Patrick Mevzek avatar
cn flag
In all your text you dig not specify how you tested DNS resolution. Indeed you shouldn't use a browser to test that but low level tools like `dig` with its `@` option. Browsers implement DoH now, and other applications can too, each one with its own policy and configuration settings, so that makes troubleshooting issues not suitable in a browser.
djdomi avatar
za flag
remind that use-application-dns.net is a valid domain
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.