Re: [Dnsmasq-discuss] Where does dnsmasq get upstream DNS servers by default?

2022-05-30 Thread Chris Green
On Mon, May 30, 2022 at 12:49:22AM +0200, Uwe Schindler via Dnsmasq-discuss 
wrote:
> Hi Chris
> > However this brings me back to where my original question came from, since 
> > there
> > is no 'nameserver' entry pointing at localhost will dnsmasq cache?  Or do I 
> > have
> > to manually add a 'nameserver 127.0.0.1' somewhere?
> 
> Dnsmasq will cache for requests coming from localhost (like local tools,
> ssh,...) and also from other devices on your local network. Local programs
> on same machine like SSH, browsers, webservers, mailservers,... work because
> of your /etc/resolv.conf file: It points to  dnsmasq.
> 
> Dnsmasq caches and forwards unknown requests to the server provided by
> NetworkManager (which does similar stuff like resolvconf package). Somebody
> should change the /etc/default/dnsmasq comment and say "resolvconf or
> NetworkManager").
> 
Yes, thanks, on thinking about how it's all supposed to work the above
makes sense.

-- 
Chris Green

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Where does dnsmasq get upstream DNS servers by default?

2022-05-29 Thread Uwe Schindler via Dnsmasq-discuss

Hi Chris

However this brings me back to where my original question came from, since there
is no 'nameserver' entry pointing at localhost will dnsmasq cache?  Or do I have
to manually add a 'nameserver 127.0.0.1' somewhere?


Dnsmasq will cache for requests coming from localhost (like local tools, 
ssh,...) and also from other devices on your local network. Local 
programs on same machine like SSH, browsers, webservers, mailservers,... 
work because of your /etc/resolv.conf file: It points to  dnsmasq.


Dnsmasq caches and forwards unknown requests to the server provided by 
NetworkManager (which does similar stuff like resolvconf package). 
Somebody should change the /etc/default/dnsmasq comment and say 
"resolvconf or NetworkManager").


Uwe


Am 29.05.2022 um 16:18 schrieb Chris Green:

With the default /etc/default/dnsmasq file on Ubuntu it says:-

  # If the resolvconf package is installed, dnsmasq will use its output
  # rather than the contents of /etc/resolv.conf to find upstream
  # nameservers. Uncommenting this line inhibits this behaviour.
  # Note that including a "resolv-file=" line in
  # /etc/dnsmasq.conf is not enough to override resolvconf if it is
  # installed: the line below must be uncommented.
  #IGNORE_RESOLVCONF=yes

I'm pretty sure I don't have resolvconf (or openresolv) so, in this
case how does dnsmasq find the upstream servers.  /etc/resolv.conf is :-

  # Generated by resolvconf
  nameserver 127.0.0.1
  search zbmc.eu
Which is a bit odd since I don't have resolvconf.

The system works OK, DNS works, but I'd like to know how.



--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: u...@thetaphi.de


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: u...@thetaphi.de


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Where does dnsmasq get upstream DNS servers by default?

2022-05-29 Thread Chris Green
On Sun, May 29, 2022 at 05:29:41PM +0200, Uwe Schindler via Dnsmasq-discuss 
wrote:
[snip - useful explanation, thank you]

Ah, now I see how it's working.  I have a file in /etc/dnsmasq.d which
contains:-

resolv-file=/run/NetworkManager/no-stub-resolv.conf

... and /run/NetworkManager/no-stub-resolv.conf is:-

# Generated by NetworkManager
search zbmc.eu
nameserver 192.168.1.2

(and I have a fully configured dnsmasq running on 192.168.1.2 with links up
to upstream nameservers)

However this brings me back to where my original question came from, since 
there 
is no 'nameserver' entry pointing at localhost will dnsmasq cache?  Or do I have
to manually add a 'nameserver 127.0.0.1' somewhere?

> Uwe
> 
> Am 29.05.2022 um 16:18 schrieb Chris Green:
> > With the default /etc/default/dnsmasq file on Ubuntu it says:-
> > 
> >  # If the resolvconf package is installed, dnsmasq will use its output
> >  # rather than the contents of /etc/resolv.conf to find upstream
> >  # nameservers. Uncommenting this line inhibits this behaviour.
> >  # Note that including a "resolv-file=" line in
> >  # /etc/dnsmasq.conf is not enough to override resolvconf if it is
> >  # installed: the line below must be uncommented.
> >  #IGNORE_RESOLVCONF=yes
> > 
> > I'm pretty sure I don't have resolvconf (or openresolv) so, in this
> > case how does dnsmasq find the upstream servers.  /etc/resolv.conf is :-
> > 
> >  # Generated by resolvconf
> >  nameserver 127.0.0.1
> >  search zbmc.eu
> > Which is a bit odd since I don't have resolvconf.
> > 
> > The system works OK, DNS works, but I'd like to know how.
> > 
> > 
> -- 
> Uwe Schindler
> Achterdiek 19, D-28357 Bremen
> https://www.thetaphi.de
> eMail: u...@thetaphi.de
> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

-- 
Chris Green

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Where does dnsmasq get upstream DNS servers by default?

2022-05-29 Thread Uwe Schindler via Dnsmasq-discuss

Hi,

/etc/resolv.conf may have this header, because at some point resolvconf 
was installed on your system. If resolvconf is (or was) installed, the 
main /etc/resolv.conf file is a symlink to some autogenerated file 
(/run/resolvconf/resolv.conf). This autogenerated file is created 
because resolvconf wants all local apps (except) dnsmasq to use dnsmasq 
as DNS server. It is NOT used as upstream server by dnsmasq, it is for 
downstream programs on local machine (like ssh, mail server,...). Plain 
simple?


So in short, your /etc/resolv.conf is correct. If you dont have 
resolvconf package installed (check with 'dpkg -l | grep resolv') it is 
a relic, but the contents are correct.


The upstream resolver used by dnsmasq is also maintained by resolvconf 
(if enabled) and passed via command line. It is also in the 
/run/resolvconf folder. If you don't have resolvconf pkg installed, you 
HAVE TO add your own "resolv-file=" or "server=ip" to dnsmasq 
config file, otherwise it won't work. There's no default on Ubuntu.


Uwe

Am 29.05.2022 um 16:18 schrieb Chris Green:

With the default /etc/default/dnsmasq file on Ubuntu it says:-

 # If the resolvconf package is installed, dnsmasq will use its output
 # rather than the contents of /etc/resolv.conf to find upstream
 # nameservers. Uncommenting this line inhibits this behaviour.
 # Note that including a "resolv-file=" line in
 # /etc/dnsmasq.conf is not enough to override resolvconf if it is
 # installed: the line below must be uncommented.
 #IGNORE_RESOLVCONF=yes

I'm pretty sure I don't have resolvconf (or openresolv) so, in this
case how does dnsmasq find the upstream servers.  /etc/resolv.conf is :-

 # Generated by resolvconf
 nameserver 127.0.0.1
 search zbmc.eu
 
Which is a bit odd since I don't have resolvconf.


The system works OK, DNS works, but I'd like to know how.



--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: u...@thetaphi.de


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] Where does dnsmasq get upstream DNS servers by default?

2022-05-29 Thread Chris Green
With the default /etc/default/dnsmasq file on Ubuntu it says:-

# If the resolvconf package is installed, dnsmasq will use its output
# rather than the contents of /etc/resolv.conf to find upstream
# nameservers. Uncommenting this line inhibits this behaviour.
# Note that including a "resolv-file=" line in
# /etc/dnsmasq.conf is not enough to override resolvconf if it is
# installed: the line below must be uncommented.
#IGNORE_RESOLVCONF=yes

I'm pretty sure I don't have resolvconf (or openresolv) so, in this
case how does dnsmasq find the upstream servers.  /etc/resolv.conf is :-

# Generated by resolvconf
nameserver 127.0.0.1
search zbmc.eu

Which is a bit odd since I don't have resolvconf.

The system works OK, DNS works, but I'd like to know how.


-- 
Chris Green

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss