Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
Vagrant DNS proxy for VirtualBox
Browse files Browse the repository at this point in the history
Use VirtualBox's builtin DNS proxy server. This ensures that the guest
doesn't see the real nameservers from the host's network, and will continue
to work when the host moves between physical locations. Cribbed from GOV.UK
  • Loading branch information
dcarley committed Jun 11, 2013
1 parent d74f5e3 commit b49ee1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Vagrantfile
Expand Up @@ -7,6 +7,14 @@ Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"

config.vm.provider :virtualbox do |vb|
modifyvm_args = ['modifyvm', :id]
# Isolate guests from host networking.
modifyvm_args << "--natdnsproxy1" << "on"
modifyvm_args << "--natdnshostresolver1" << "on"
vb.customize(modifyvm_args)
end

config.vm.provision :puppet do |puppet|
puppet.manifest_file = "site.pp"
puppet.manifests_path = "manifests"
Expand Down

0 comments on commit b49ee1c

Please sign in to comment.