Cannot make outbound HTTP Requests from vagrant VM
This looks like a DNS configuration issue. Do a nslookup google.com
and see what the result is.
Try to add the following block in your Vagrantfile
, set --natdnshostresolver1
to on so as to force the VirtualBox NAT engine to intercept DNS requests and forward them to host's resolver
config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]end
BTW: Without vagrant reload
, you can directly look into the /etc/resolv.conf
inside the VM, can manually set it to the DNS server of your network, most likely it'll work fine.