0

I want to run an bind dns server in an guest system. On the host is kvm running. How I see, kvm needs dnsmasp to run, which is blocking port 53. So I can not forward the port from the VM, is it right? Is it possible to get arround this? If not, what the alterntives? I do not want to run the dns server directly on the host, because of securety.

To forward the port I added

<qemu:commandline>
  <qemu:arg value='-redir'/>
  <qemu:arg value='tcp:53::53'/>
</qemu:commandline>

to the vm file via virsh.

I tested it with redirecting ssh port to port 2222 of host system, it works. But if I want to start the machine with forwarding port 53 i get an error message:

error: Failed to start domain debian-bind error: internal error: process exited while connecting to monitor: 2016-10-09T20:46:39.874790Z qemu-system-x86_64: -netdev user,id=hostnet0: could not set up host forwarding rule 'tcp:53::53' 2016-10-09T20:46:39.874909Z qemu-system-x86_64: -netdev user,id=hostnet0: Device 'user' could not be initialized

CordlessWool
  • 1,388
  • 4
  • 17
  • 35

1 Answers1

0

Configure your vm's network using bridge, iso. the default

--network model=virtio,bridge=virbr0

That's how it's done with Oracle's Virtualbox when you want to run a server within a guest vm. The guest can then have it's own IP's and avoid port conflicts.

Gerard H. Pille
  • 2,528
  • 1
  • 13
  • 17