Score:0

How to have dnsmasq resolve local domains, but also use DHCP-provided name servers?

in flag

I'm using Pi Hole on my local network, and in addition to providing DNS service, it's responsible for allocating IPs via DHCP, and clients are provided with its IPs to use for DNS.

This all works fine by itself - a client joins the network, gets an IP and DNS server from DHCP and all is good.

I then have Laravel Valet on my local macOS dev machine. One of Valet's key features is to map the .test TLD to local apps, and it does this by installing dnsmasq with a config to provide that mapping, and that part works fine. What's not good is that this also overrides the DNS servers provided by DHCP, substituting its own servers, such as CloudFlare 1.1.1.1, and configuring itself as the local name server, running on localhost. Things continue working, but I lose all the ad-blocking and other features of Pi Hole.

How Valet does this is documented here. That discussion shows how to override dnsmasq's upstream servers manually, but I'd like this to make use of DHCP so that it's a generic, automatic solution that will work for everyone.

How can I make dnsmasq provide local name resolution for the .test domain while also having it obtain its upstream DNS servers from DHCP?

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.