[Dnsmasq-discuss] [PATCH 1/2] server option needs a server

2022-05-30 Thread 'Geert Stappers via Dnsmasq-discuss
From: Geert Stappers 

When using option '--server', is an upstream server mandatory.
Expressing that by removing the [ ]  that suggests that  is optional.

At the spanish translation is only a [ removed.

Signed-off-by: Geert Stappers 
---
 man/dnsmasq.8| 2 +-
 man/es/dnsmasq.8 | 2 +-
 man/fr/dnsmasq.8 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/man/dnsmasq.8 b/man/dnsmasq.8
index fea89fa..6030e65 100644
--- a/man/dnsmasq.8
+++ b/man/dnsmasq.8
@@ -443,7 +443,7 @@ Tells dnsmasq to never forward A or  queries for plain 
names, without dots
 or domain parts, to upstream nameservers. If the name is not known
 from /etc/hosts or DHCP then a "not found" answer is returned.
 .TP
-.B \-S, --local, 
--server=[/[]/[domain/]][[#]][@][@[#]]
+.B \-S, --local, 
--server=[/[]/[domain/]][#][@][@[#]]
 Specify IP address of upstream servers directly. Setting this flag does
 not suppress reading of /etc/resolv.conf, use \fB--no-resolv\fP to do that. If 
one or more
 optional domains are given, that server is used only for those domains
diff --git a/man/es/dnsmasq.8 b/man/es/dnsmasq.8
index 4a70a4f..0a12156 100644
--- a/man/es/dnsmasq.8
+++ b/man/es/dnsmasq.8
@@ -336,7 +336,7 @@ sin puntos o partes de dominios, a servidores upstream. Si 
el nombre
 no se conoce desde /etc/hosts o desde DHCP entonces una respuesta
 "no encontrado" es devuelta.
 .TP
-.B \-S, --local, --server=[/[]/[dominio/]][[#][@|[#]]
+.B \-S, --local, --server=[/[]/[dominio/]][#][@|[#]]
 Especificar la direcci�n IP de servidores upstream directamente. Fijar
 esta opci�n no suprime la lectura de /etc/resolv.conf, use -R para
 hacer eso. Si uno a m�s dominios opcionales son brindados, ese servidor
diff --git a/man/fr/dnsmasq.8 b/man/fr/dnsmasq.8
index dc2fdc0..3da75f6 100644
--- a/man/fr/dnsmasq.8
+++ b/man/fr/dnsmasq.8
@@ -421,7 +421,7 @@ des noms simples, c'est à dire ne comprenant ni points ni 
nom de domaine. Si un
 nom n'est pas dans /etc/hosts ou dans la liste des baux DHCP, alors une réponse
 de type "non trouvé" est renvoyée.
 .TP
-.B \-S, --local, --server=[/[]/[domaine/]][[#][@|[#]]]
+.B \-S, --local, --server=[/[]/[domaine/]][#][@|[#]]
 Spécifie directement l'adresse IP d'un serveur de nom amont. Cette option ne
 supprime pas la lecture du fichier /etc/resolv.conf : utiliser pour cela
 l'option
-- 
2.36.1


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


[Dnsmasq-discuss] [PATCH] --local was syntactically sugar on top of --server

2022-05-30 Thread 'Geert Stappers via Dnsmasq-discuss
From: Geert Stappers 

Manual page was unaware that --local became a separate option.

Now matches the --server and --local section with what
in option.c is:

$ grep -e '{ "server"' -e '{ "local"' src/option.c
{ "server", 1, 0, 'S' },
{ "local", 1, 0, LOPT_LOCAL },
$

---
 man/dnsmasq.8 | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/man/dnsmasq.8 b/man/dnsmasq.8
index 6030e65..890b360 100644
--- a/man/dnsmasq.8
+++ b/man/dnsmasq.8
@@ -443,7 +443,7 @@ Tells dnsmasq to never forward A or  queries for plain 
names, without dots
 or domain parts, to upstream nameservers. If the name is not known
 from /etc/hosts or DHCP then a "not found" answer is returned.
 .TP
-.B \-S, --local, 
--server=[/[]/[domain/]][#][@][@[#]]
+.B \-S, 
--server=[/[]/[domain/]][#][@][@[#]]
 Specify IP address of upstream servers directly. Setting this flag does
 not suppress reading of /etc/resolv.conf, use \fB--no-resolv\fP to do that. If 
one or more
 optional domains are given, that server is used only for those domains
@@ -492,10 +492,6 @@ flag which gives a domain but no IP address; this tells 
dnsmasq that
 a domain is local and it may answer queries from /etc/hosts or DHCP
 but should never forward queries on that domain to any upstream
 servers.
-.B --local
-is a synonym for
-.B --server
-to make configuration files clearer in this case.
 
 IPv6 addresses may include an %interface scope-id, eg
 fe80::202:a412:4512:7bbf%eth0.
@@ -513,6 +509,12 @@ source address specified but the port may be specified 
directly as
 part of the source address. Forcing queries to an interface is not
 implemented on all platforms supported by dnsmasq.
 .TP
+.B --local=[/[]/[domain/]]
+is like
+.B --server
+but the DNS requests are handled locally.
+So no need to provide [#][@][@[#]]
+.TP
 .B 
--rev-server=[/][,][#][@][@[#]]
 This is functionally the same as 
 .B --server, 
-- 
2.36.1


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


[Dnsmasq-discuss] [PATCH 2/2] --local was syntactically sugar on top of --server

2022-05-30 Thread 'Geert Stappers via Dnsmasq-discuss
From: Geert Stappers 

Manual page was unaware that --local became a separate option.

Now matches the --server and --local section with what
in option.c is:

$ grep -e '{ "server"' -e '{ "local"' src/option.c
{ "server", 1, 0, 'S' },
{ "local", 1, 0, LOPT_LOCAL },
$

---
 man/dnsmasq.8 | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/man/dnsmasq.8 b/man/dnsmasq.8
index 6030e65..6950a23 100644
--- a/man/dnsmasq.8
+++ b/man/dnsmasq.8
@@ -443,7 +443,7 @@ Tells dnsmasq to never forward A or  queries for plain 
names, without dots
 or domain parts, to upstream nameservers. If the name is not known
 from /etc/hosts or DHCP then a "not found" answer is returned.
 .TP
-.B \-S, --local, 
--server=[/[]/[domain/]][#][@][@[#]]
+.B \-S, 
--server=[/[]/[domain/]][#][@][@[#]]
 Specify IP address of upstream servers directly. Setting this flag does
 not suppress reading of /etc/resolv.conf, use \fB--no-resolv\fP to do that. If 
one or more
 optional domains are given, that server is used only for those domains
@@ -492,10 +492,6 @@ flag which gives a domain but no IP address; this tells 
dnsmasq that
 a domain is local and it may answer queries from /etc/hosts or DHCP
 but should never forward queries on that domain to any upstream
 servers.
-.B --local
-is a synonym for
-.B --server
-to make configuration files clearer in this case.
 
 IPv6 addresses may include an %interface scope-id, eg
 fe80::202:a412:4512:7bbf%eth0.
@@ -513,6 +509,12 @@ source address specified but the port may be specified 
directly as
 part of the source address. Forcing queries to an interface is not
 implemented on all platforms supported by dnsmasq.
 .TP
+.B --local=[/[]/[domain/]]
+is like
+.B --server
+but the DNS requests are handled locally.
+So need to provide [#][@][@[#]]
+.TP
 .B 
--rev-server=[/][,][#][@][@[#]]
 This is functionally the same as 
 .B --server, 
-- 
2.36.1


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


[Dnsmasq-discuss] Can I have a little clarification of -S, --local, --server please

2022-05-30 Thread Chris Green
In the man page in the section on "-S, --local, --server" it says
(among other things) :-

  Also permitted is a -S flag which gives a domain but no IP address; this  
tells
  dnsmasq  that  a  domain  is local and it may answer queries from 
/etc/hosts or
  DHCP but should never forward queries on that domain to any  upstream  
servers.
  --local  is  a synonym for --server to make configuration files clearer 
in this
  case.

Does this mean that "a domain but no IP address" can only be given
with the -S flag?  I suspect not but it's not immediately clear. 
Looking at the syntax given in the first line it would seem that
-S, --local and --server are *exactly* the same and one can choose
which to use to make the configuration file more user friendly.

E.g. I have in my dnsmasq configuration file:-

local=/zbmc.eu/

since my static IP home system is at zbmc.eu and I give the various systems
here names like esprimo.zbmc.eu, backup.zbmc.eu and so on.

Presumably I could change the above line to:-

server=/zbmc.eu/

and everything would work the same.  Presumably the -S option is only for
use in the dnsmasq command line

-- 
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-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