From c137dec14f6a7dcfc032a0967ed520addba16b87 Mon Sep 17 00:00:00 2001 From: Seth Chisamore Date: Fri, 23 Mar 2012 09:37:04 -0400 Subject: [PATCH] Enable DNS proxy (in NAT mode) by default --- lib/vagrant/action/vm/sane_defaults.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/vagrant/action/vm/sane_defaults.rb b/lib/vagrant/action/vm/sane_defaults.rb index 418ca8d97..5b27aa041 100644 --- a/lib/vagrant/action/vm/sane_defaults.rb +++ b/lib/vagrant/action/vm/sane_defaults.rb @@ -21,6 +21,14 @@ module Vagrant ] env[:vm].driver.execute_command(command) + # Enable the DNS proxy while in NAT mode. This shields the guest + # VM from external DNS changs on the host machine. + command = [ + "modifyvm", env[:vm].uuid, + "--natdnsproxy1", "on" + ] + env[:vm].driver.execute_command(command) + @app.call(env) end end