Archit Arora
Archit Arora

Reputation: 2636

Allow vagrant to access host internet

Im using virtualbox + ubuntu + vagrant. However im not able to ping or wget any url. Please guide me on how I can allow the VM to access my host machine's internet?

Upvotes: 7

Views: 4639

Answers (1)

Robert
Robert

Reputation: 10953

this works for me. Configure the Vagrantfile with this.

config.vm.provider :virtualbox do |vb|

     vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
     vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end

I hope this help.

Upvotes: 5

Related Questions