Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Have a Ubuntu guest in VirtualBox using NAT. It has an IP of The VM can hit anything in the outside world. However, the host OS (Windows 7) cannot ping the internal VM ('Destination net unreachable').

Any tips on how to resolve this? Thanks!

share|improve this question
Don't use nat, use a bridged interface? – Zoredache May 6 '10 at 18:18
ARGH man I would if the network I was on allowed it, but thanks for not answering the question. – Wells Oliver May 6 '10 at 18:21
@Wells-Zoredache was answering that way because this question has come up a LOT on the Internet, and 99% of the time bridging is the answer because of the funky way NAT worked on Virtualbox. Port forwarding was a PAIN and very limited when NATting the interface. In NAT mode, Virtualbox really does isolate the system quite heavily and you're going to have some gymnastics to get it to do anything beyond sharing a directory with the host as a mapped drive. – Bart Silverstrim May 6 '10 at 18:42
@Wells Oliver, I don't use virtualbox and I don't know how to fix the private network to be usable from the host. I just thought I would double check that you had tried or ruled out the obvious solution based on my experience with other VM products. – Zoredache May 6 '10 at 22:08
Similar question:… – splattne May 14 '10 at 14:23

According to the VirtualBox manual, a virtual machine with NAT acts like a computer connected to the Internet through a router. In other words, the virtual machine is in a private network behind the router and cannot be accessed by the host.

If you change the network adapter to "bridged", the host will be able to see your virtual machine. But, so does everyone else on the same network. I have tried this with Windows 7 host and Windows 7 guest. Windows 7 discover each other immediately.

The manual also mentions about port forwarding, but I am still learning from other experts. Sorry, cannot give any suggestion on this area.

No much real help. But, hope this give you some idea.

share|improve this answer

There is still the solution (not sure if VirtualBox will like that but...) to add another network card. One on NAT for contacting the outside world, and the other sharing a private network with the host. Normally it'll do the trick.

Hope this will help you

share|improve this answer

If NAT doesn't work (doesn't surprise me) and you can't use Bridged mode, create a Host-only network. A Host-only network behaves like a Bridged network, but there is no connection to the physical network. Essentially it creates a virtual switch and connects the virtual adapters to that. If you need an adapter on the host system, a Microsoft Loopback Adapter will likely work if VirtualBox doesn't supply virtual host adapters.

If you need to get to the Internet from the guest as well, create an additional network adapter in the guest which uses NAT.

Be sure not to create any virtual or physical networks on the same IP subnet. They are separate networks and must be configured with different IP subnets or your computer will send data packets to the wrong location! Your communication will silently fail, as you will have essentially told your computer to turn left when it needed to bear right.

This is trivial to configure on VMWare Workstation with the Virtual Network Editor. I haven't used VirtualBox since v2, but I can see from the manual that this type of configuration is possible.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.