[Dnsmasq-discuss] Rather basic question - how do you tell dnsmasq what upstream DNS servers to use?

Chris Green cl at isbd.net
Sat Oct 3 15:59:46 BST 2020


I'm feeling really silly, I've been using dnsmasq for several years
running it on a dedicated Raspberry Pi on the LAN to provide local DNS.

It's been working perfectly OK but just a very short while ago the
Google DNS server at 8.8.8.8 went down for a while and it's what I
(appear to) use as the upstream DNS.

How and where does one set dnsmasq's upstream DNS? Is it the following
line in /etc/dhcpcd.conf :-

    /etc/dhcpcd.conf:static domain_name_servers=192.168.1.4 8.8.8.8 fd51:42f8:caae:d92e::1

The file /run/dnsmasq/resolv.conf appears to be derived directly from
the above:-

    chris at newdns$ more resolv.conf
    # Generated by resolvconf
    nameserver 192.168.1.4
    nameserver 8.8.4.4
    nameserver fd51:42f8:caae:d92e::1

The Raspberry Pi running dnsmasq is 192.168.1.4 on the LAN here, I'm
running dnsmasq version 2.76.

Would I be better with two unrelated DNS servers in the above
configuration, e.g. a Google one and one from my ISP?

-- 
Chris Green



More information about the Dnsmasq-discuss mailing list