[Dnsmasq-discuss] Rather basic question - how do you tell dnsmasq what upstream DNS servers to use?
Geert Stappers
stappers at stappers.nl
Sat Oct 3 19:49:37 BST 2020
On Sat, Oct 03, 2020 at 07:19:10PM +0100, Chris Green wrote:
> On Sat, Oct 03, 2020 at 06:06:56PM +0200, Geert Stappers wrote:
> > On Sat, Oct 03, 2020 at 03:59:46PM +0100, Chris Green wrote:
> > > 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.
> >
> > Snippet from the dnsmasq manual page:
> >
> > -S, --local,
> > --server=[/[<domain>]/[domain/]][<ipaddr>[#<port>][@<source-ip>|<interface>[#<port>]]
> > Specify IP address of upstream servers
> > directly. Setting this flag does not suppress
> > reading of /etc/resolv.conf, use --no-resolv to do that.
> >
> Yes, but do I want it to ignore /etc/resolv.conf (well, actually,
> /var/run/dnsmasq/resolv.conf) ? Do I want resolvconf to handle which
> DNS servers are used or am I better turning resolvconf off altogether?
When possible: Yes.
Or even better: Make turning of resolvconf possible and do it.
Underlying idea:
Dnsmasq is a server thing, resolvconf is a client thing.
Roughly the defintion of those two:
Server: configurated by administrator knowing what should be done.
Client: configurated by stuff on network, tends to break outside the default.
Regards
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list