[Dnsmasq-discuss] How to NOT bind dnsmasq to lo?
Tim Tassonis
stuff at decentral.ch
Thu Jul 11 20:07:31 UTC 2024
On 7/10/24 22:29, Buck Horn via Dnsmasq-discuss wrote:
> Hi Tim,
>
> On 10.07.24 21:55, Tim Tassonis wrote:
>> Hi all
>>
>> However, I however would like to run a second instance of dnsmasq
>> binding only to a tap0, for a virtual network (vde2) for some qemu
>> virtual machines, and I can't seem to get that to work, as it always
>> complains about 127.0.0.1 already being taken.
>
>
> You could try adding 'bind-interfaces' to your config, in order to
> discipline your second dnsmasq instance.
>
> Quoting from the docs:
>
> > 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.
>
>
> But why do you require a second dnsmasq instance?
>
> Why wouldn't tagging allow you to manage your network with only one
> instance of dnsmasq?
Because I need the second instance only sporadically, when I want to
start the virtual switch for my vm's.
The first one would be the "normal" one, for the host's real needs. The
second one should only serve the vm's in a separate net. And it has to
work even if I'm not using dnsmasq as a local resolver.
Bye
Tim
More information about the Dnsmasq-discuss
mailing list