1

Arch up to date.

Through QEMU manager I had recently created a NAT network mapped to my wireless device. The plan is to use the wireless for the VM and the ethernet for the host. Before that the VM and the host unbound were okay.

No other system changes.

Now, after system reboot, unbound fails to start, complaining that it can't get port 53. Through lsof I see that dnsmasq has taken 53. This happens even though I have the virtual networks to NOT start up on boot.

I don't want to change unbound's port because that will require re-configuring its clients.

Why is dnsmasq starting?

What is the simplest least impactful configuration change?

Stephen Boston
  • 1,928
  • 3
  • 25
  • 50

1 Answers1

3

Are you using libvirt (virsh, virtmanager, etc)?

Some (most? all?) distros declare some kind of dependency relationship between libvirt and dnsmasq. For example, on Debian, the libvirt-daemon-system package Recommends the dnsmasq package (which means it will be installed when you install libvirt-daemon-system unless you have disabled installing recommended packages - e.g. with Install-Recommends "False"; in your /etc/apt/apt.conf).

Anyway, if you are using libvirt, look in /etc/libvirt/qemu/networks/autostart. Or, better yet, use the virsh commands to check -- see below.

If there is a file/symlink in there with rules for dhcp (which is pretty much the main reason for bothering to define a network in libvirt), then libvirt will start an instance of dnsmasq to provide dhcp, dns, and/or tftp services for the VMs. This is often enabled by default when you install libvirt.

  1. Check to see if there are any autostarted network definitions:

    virsh net-list --all
    
  2. If there are, you can view the contents with virsh net-dumpxml. e.g. if the name of the network definition is "default":

    virsh net-dumpxml default
    
  3. If it enables dhcp, you can stop that (and stop it from autostarting on next reboot) with:

    virsh net-destroy default             # stop it running NOW.
    virsh net-autostart --disable default # prevent it from auto-starting
    

PS: I disabled dnsmasq being started by libvirt years ago on my systems. I prefer to run unbound and ISC dhcpd.

cas
  • 1
  • 7
  • 119
  • 185