dee31797 Posted June 29, 2019 Share Posted June 29, 2019 Libvirt runs a DNS server on interface virbr0 that can be disabled with "virsh net-edit default" and adding <dns enable='no'/> to the XML. What is the best way to make this the default at start up? Thanks Quote Link to comment
jonp Posted July 1, 2019 Share Posted July 1, 2019 I think you can add that command to the go file located under the config directory of the flash device. That should make that happen each time at boot. Quote Link to comment
exibit Posted April 29, 2022 Share Posted April 29, 2022 For those coming across this in a Google search (like me), the above pointed me in the right direction and I was able to get this to work by adding the following to my /boot/config/go file: # Disable DNS on KVM so PiHole container can use port 53 # https://forums.unraid.net/topic/81356-libvirt-dns-disabled-at-boot/ EDITOR='sed -i '"'"'s/<\/network>/ <dns enable="no"\/>\n<\/network>/g'"'"'' virsh net-edit default After rebooting, the above allows me to bind a PiHole Docker container to port 53 (without having to give it its own IP address on my local network). I tried using net-update first, but was getting the error "unrecognized section name 'dns'". This hackery of using sed as the editor for net-edit was the only way I was able to get this to work. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.