How to make host only mode work in VM

1

I'm running Windows inside a VM inside OSX. If I set the connection to host only, then I get a connection that seems to work. However, when I go try to go to web pages, they won't load. Why is that?

tony_sid

Posted 2011-03-05T09:17:10.293

Reputation: 11 651

Answers

4

The hint is in the name of the connection type... "Host Only"

It means what it says - create a virtual network between the Virtual Machine and the Host Virtualbox is running on

To get outside the local host you will either need to use NAT mode or Bridged

Majenko

Posted 2011-03-05T09:17:10.293

Reputation: 29 007

I'm just going to outside sites like normal. Not using a proxy. – tony_sid – 2011-03-05T09:47:58.500

What if I want to use host only mode? What changes should I make to OSX? Which program is useful? – tony_sid – 2011-03-05T10:22:19.830

Then you would need to turn on ip forwarding (not sure how in OS/X, but if it's like FreeBSD then sysctl net.inet.ip.forwarding=1 should do it until the next reboot) and add a static route to your router to the private host-only network routed through your OS/X machine's IP address (how depends on your router). – Majenko – 2011-03-05T10:25:43.290

@Jedi Why do you want to use host-only? Sounds like NAT is the mode you really want. – Mark E. Haase – 2011-03-08T21:49:33.457