Host-only guest can't connect to the internet

Discussions related to using VirtualBox on Windows hosts.
Post Reply
NShoe
Posts: 6
Joined: 8. Dec 2014, 00:21

Host-only guest can't connect to the internet

Post by NShoe »

Alright, so I'm trying to set up my VMs so that I can connect from one VM to another, both guests are linux, I tried setting it to Bridged and that didn't work so I set it to Host-only and now I'm able to get unique ip addresses for each guest, the problem is, now I can't connect to the internet, I know that because in Kali I get a server not found error with every url I enter, so how do I configure it so that I can get an internet connection?
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Host-only guest can't connect to the internet

Post by BillG »

No it can't. It is not supposed to. The sole purpose of the host only adapter is to allow the guests to communicate with the host.

Bridged would be how I would configure it. What "didn't work" with bridged mode? Is your host on a LAN with Internet access? Do the guests get an IP from DHCP when set to bridged?
Bill
echeadle2
Posts: 3
Joined: 9. Oct 2015, 21:36

Re: Host-only guest can't connect to the internet

Post by echeadle2 »

I run my guests with 2 interfaces. A host-only interface makes it easy to communicate to guest vms and you don't run into the problem of changing addresses when you move to another network like you might with bridged. The first interface I run with NAT. It communicates to the internet, then from the host I connect using the host-only or rather I did until the host-only adapter stopped working completely. Now I may have to go back to bridged until the issue gets worked out or I reimage my machine. But if your host-only adapter is working, add another network to your vm guest and communicate to with it. The other issue with bridged networking is that it exposes your vm's more directly to the internet and it is seen on the network and some companies don't approve.
Post Reply