How to resolve DNS requests using host DNS settings when in virtual Windows guest machine (VirtualBox)

Submitted by Jochus on Thu, 04/01/2018 - 19:43 | Posted in: Linux


My host system is an Ubuntu 17.04 installation. I'm running a Windows virtual machine using VirtualBox. My network adapter is configured to use NAT. I was facing issues in which DNS resolving in the guest system was not equal to DNS resolving in the host system. To enforce this, I had the run the following configuration setting in the host system:

$ VBoxManage modifyvm "VM name" --natdnshostresolver1 on

--natdnshostresolver<1-N> on|off: This setting makes the NAT engine use the host's resolver mechanisms to handle DNS requests. Please see Section 9.11.5, “Enabling DNS proxy in NAT mode” for detailsx).

Add new comment

The content of this field is kept private and will not be shown publicly.

Full HTML

  • Lines and paragraphs break automatically.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
  • Web page addresses and email addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <cpp>, <css>, <html5>, <java>, <javascript>, <php>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.