Connecting to VirtualBox guest (ubuntu) from host (osx) via NAT?

I have a VirtualBox guest (running Ubuntu) configured with NAT through my host laptop (running OSX). It was my understanding that with NAT configured, I could access the guest from the host (w/o any port forwarding magic) but not from any outside machine...was I incorrect in thinking that?

I would use bridged networking, but every time I switch networks (@ home, @ work, tethered to my phone), the guest's ip will change, right?


If you only need to access the guest from the host, then you want "Host only" networking. The IP address will appear if you hover over the network icon in the virtualbox window.

If you need to get to the internet from your virtualbox guest, then you can use BOTH Host only and NAT (virtaulbox supports up to 4 different network adapters).


Generally from remote through nat is a pain. Depending on the virtualization technology, they each offer different methods to overcome this. Virtualbox has an option to forward port X to virtualized client if I remember properly...this would be required to do remote host access of client vm through nat.