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?