Anybody use pi-hole alongside QEMU-KVM? (dnsmasq conflict)

Long story short, pihole-FTL refuses to start because I have another process using port 53.

$ sudo lsof -i :53
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dnsmasq 2650 nobody 5u IPv4 35901 0t0 UDP trinity:domain
dnsmasq 2650 nobody 6u IPv4 35902 0t0 TCP trinity:domain (LISTEN)

I don't have dnsmasq installed so I figured I just kill it by process ID. Turns out it was a child process of QEMU-KVM because killing that process breaks the internet in my virtual machine, and the only way to fix it is to restart the whole computer.

Anybody run into this before?

EDIT: As a work-around, I can change the type of virtual networking device of the VM, but this causes the VM to have the same IP address as the host, which breaks communication between VM and host and thus is not a solution.

I don't use QEMU-KVM, but searching for QEMU-KVM dnsmasq port returned a few links:

If you'd be using libvirt, the following may also be relevant:

In your case, the "global" dnsmasq from that linked text is your Pi-hole.

To apply the suggested configuration to your "global" dnsmasq/Pi-hole, you could switch Pi-hole's Interface settings under Settings | DNS to Bind only to interface <interface-name>.

1 Like

It worked! Thanks :smiley:

Glad to hear your Pi-hole is operational. :slight_smile:

For the benefit of other users using QEMU-KVM, could you mark a post as solution, or if none would fit your procedure, describe shortly how you managed to address your issue?

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.