[Dnsmasq-discuss] Fwd: Is dnsmasq supposed to listen on UDP port 0.0.0.0:67 when listen-address is specified?

Parke parke.nexus at gmail.com
Thu Dec 21 02:34:03 GMT 2017


[ I replied off-list by mistake.  Here is a forward.]

On Wed, Dec 20, 2017 at 3:37 PM, Kurt H Maier <khm at sciops.net> wrote:
> From the manpage:
>
> -z, --bind-interfaces
>     On systems which support it, dnsmasq binds the wildcard address,
> even when it is listening on only some interfaces. It then discards
> requests that it shouldn't reply to. This has the advantage of working
> even when interfaces come and go and change address. This option forces
> dnsmasq to really bind only the interfaces it is listening on. About the
> only time when this is useful is when running another nameserver (or
> another instance of dnsmasq) on the same machine. Setting this option
> also enables multiple instances of dnsmasq which provide DHCP service to
> run in the same machine.
>
> khm

Unfortunately, I've already specified "bind-interfaces" in
dnsmasq.conf.  (Sorry, I should have included that fact in my original
post.)

When I remove "bind-interfaces", then the DNS socket also binds to
0.0.0.0.  So "bind-interfaces" is having some effect.

However, with or without "bind-interfaces", the DHCP socket is still
bound to 0.0.0.0.

Any other suggestions?


On Wed, Dec 20, 2017 at 5:33 PM, Kurt H Maier <khm at sciops.net> wrote:
> On many systems, it's not possible to receive broadcast packets without
> binding to the wildcard address.  I'm sure that's not the case on linux,
> but I'm not sure DNSMasq contains the code specific to that platform
> that would enable it.

The docs do say multiple DHCP servers can run on the same machine.

> From the manpage:
> -z, --bind-interfaces
> [snip]  Setting this option
> also enables multiple instances of dnsmasq which provide DHCP service to
> run in the same machine.

I don't see how multiple instances could provide DHCP if one of the
instances binds to 0.0.0.0:67.

I'd be very surprised if DNSMasq supported the functionality on some
platforms but NOT on Linux.

I will try a minimal config file and see what happens.

-Parke



More information about the Dnsmasq-discuss mailing list