Disable or change port of dnsmasq service in libvirt
Solution 1
You can disable DNS for a network with <dns enable="no"/>
in the network XML. See the documentation.
Solution 2
No need to disable the dnsmasq service in the Libvirtd. Just tell DNSMASK to listen on needed interfaces:
Edit
/etc/dnsmasq.conf
Uncomment:
bind-interfaces
Restart dnsmasq:
systemctl restart dnsmasq.service
Additional informathion: Libvirtd and dnsmasq
This command may be useful. To check which interfaces used:
netstat -anp | grep :53
![TheEdgeOfRage](https://i.stack.imgur.com/mXX2L.png?s=256&g=1)
TheEdgeOfRage
Apparently, this user prefers to keep an air of code about them.
Updated on September 18, 2022Comments
-
TheEdgeOfRage almost 2 years
I'm using libvirt to manage my VMs, but I don't need the dnsmasq DNS server that gets automatically started with the service as it conflicts with my acme-dns setup.
Is there a way to change disable the DNS server completely and use dnsmasq only for DHCP, or at least change the port on which dnsmasq is listening?
Editing
/var/lib/libvirt/dnsmasq/default.conf
has no point since it just get overridden, but when usingsudo virsh net-edit default
it's in a completely different format.