[Dnsmasq-discuss] Problem with no-resolv and no IP

Geert Stappers stappers at stappers.nl
Sun Mar 6 09:18:35 UTC 2022


On Sun, Mar 06, 2022 at 07:22:19AM +0200, Alkis Georgopoulos wrote:
> On 3/6/22 05:35, Donald Muller wrote:
> > Alkis Georgopoulos
> > Sent Saturday, March 5, 2022 4:46 PM
> > > 
> > > Hi, on Ubuntu 22.04 and dnsmasq 2.86-1.1:
> > > 
> > > 1) Use the following dnsmasq.conf:
> > >      no-resolv
> > >      server=8.8.8.8
> > > 2) Ifdown the network so that there's no local IP
> > > 3) (Re)start dnsmasq
> > > 4) Ifup the network, let's say local IP=10.0.0.1 now
> > > 
> > > At that point:
> > > 5) `host google.com 10.0.0.1` fails with connection timed out,
> > > 6) `host google.com 127.0.0.1` works.
> > > 
> > > In other words, when dnsmasq is started when there's no local IP, AND
> > > no-resolv is set, then dnsmasq doesn't reply to the local IPs that are
> > > assigned later on.
> > > 
> > 
> > I think you need to enable
> > 
> > --bind-dynamic
> >    Enable a network mode which is a hybrid between --bind-interfaces
> >    and the default. Dnsmasq binds the address of individual
> >    interfaces, allowing multiple dnsmasq instances, but if new
> >    interfaces or addresses appear, it automatically listens
> >    on those (subject to any access-control configuration). This
> >    makes dynamically created interfaces work in the same way as the
> >    default. Implementing this option requires non-standard networking
> >    APIs and it is only available under Linux. On other platforms it
> >    falls-back to --bind-interfaces mode.
> 
> aren't bind-dynamic and bind-interfaces for people that have multiple
> services in the 53 port?
> I have a single dnsmasq running, and it's listening on 0.0.0.0:53, i.e. on
> "all interfaces", shouldn't it be answering?

Please recognize that the text after  --bind-dynamic  is also
in the dnsmasq manual page.
 
> I think it's a wrong initialization bug somewhere in the code that decides
> when dnsmasq should answer. Configuration workarounds do exist, but I feel
> that it's a bug that should be resolved by updating the dnsmasq codebase.

No.


Long:
Regarding this "problem" is it not important what you feel.

And if you think:
* think about what is going on
* think what you should do


What is going on:
* dnsmasq is stacked upon network
* the network layer is removed, things break
* network is restored, not under the still running dnsmasq

What should be done:
* Keep trying to be a good human
* Keep trying to be a good libre software community member
* Understand that dnsmasq has "bind dynamic"
* Activate  bind-dynamic in your configuration
* Report back
* Make it possible to read this discussion in the discussion order,
  reply below previous text


 
> > > Please Cc me as I'm not subscribed to the list.
> > > 
> > > Thank you,
> > > Alkis Georgopoulos

It is because I respect an "alkisg" that I known from iPXE project, that
I do a "reply to all".  (No, I don't known if Alkis Georgopoulos and
"alkisg" are the same person)

Otherwise I would have ignore that request and done a "reply to list",
thinking: "So you want something from a community, but you don't want
to join that community".


Groeten
Geert Stappers
-- 
Silence is hard to parse



More information about the Dnsmasq-discuss mailing list