]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: don't forward DNS requests from isolated networks
authorLaine Stump <laine@laine.org>
Fri, 29 Jul 2011 19:42:04 +0000 (15:42 -0400)
committerLaine Stump <laine@laine.org>
Fri, 29 Jul 2011 21:23:55 +0000 (17:23 -0400)
commit513122ae93be9e21fd809a100580ce6fbb4e0ba5
tree40e266bdb867b6dc6f360bc46d6c0f4f8f8b1b0b
parentc5b6537b1f1f3e126c2f06f84ca88fe3df6cde34
network: don't forward DNS requests from isolated networks

This is in response to:

  https://bugzilla.redhat.com/show_bug.cgi?id=723862

which points out that a guest on an "isolated" network could
potentially exploit the DNS forwarding provided by dnsmasq to create a
communication channel to the outside.

This patch eliminates that possibility by adding the "--no-resolv"
argument to the dnsmasq commandline, which tells dnsmasq to not
forward on any requests that it can't resolve itself (by looking at
its own static hosts files and runtime list of dhcp clients), but to
instead return a failure for those requests.

This shouldn't cause any undesirable change from current
behavior, even in the case where a guest is currently configured with
multiple interfaces, one of them being connected to an isolated
network, and another to a network that does have connectivity to the
outside. If the isolated network's DNS server is queried for a name
it doesn't know, it will return "Refused" rather than "Unknown", which
indicates to the guest that it should query other servers, so it then
queries the connected DNS server, and gets the desired response.
src/network/bridge_driver.c
tests/networkxml2argvdata/isolated-network.argv