dnsmasq - Debian Wiki
https://wiki.debian.org/dnsmasqIn order to configure dnsmasq to act as cache for the host on which it is running, put "nameserver 127.0.0.1" in /etc/resolv.conf to force local processes to send queries to dnsmasq. Then either specify the upstream servers directly to dnsmasq using --server options or put their addresses real in another file, say /etc/resolv.dnsmasq and run dnsmasq with the -r /etc/resolv.dnsmasq option.
dnsmasq - ArchWiki - Arch Linux
https://wiki.archlinux.org/title/Dnsmasqnameserver ::1 nameserver 127.0.0.1 options trust-ad Make sure to protect /etc/resolv.conf from modification as described in Domain name resolution#Overwriting of /etc/resolv.conf. The upstream DNS server addresses must then be specified in dnsmasq's configuration file as server=server_address.