Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 900
Archit Arora Avatar asked Feb 07 '14 11:02

Archit Arora


1 Answers

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.

like image 169
Robert Avatar answered Sep 26 '22 19:09

Robert