Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have set up a virtual machine with Virtual Box. But I cant ping the virtual machine from the host Windows 7 if I have NAT on the virtual machine.

I know it works with bridged but I would like it to work with NAT, is that possible?

share|improve this question

1 Answer 1

Not really as with NAT, you are only pinging the actual host/router that is performing NAT (in this case, the virtual network interface/similar of your machine).

Whilst you can usually port forward from the NAT interface to the virtual IP behind it (this is basically a virtual router), ICMP packets (which are needed for ping) will not forward as it sort of goes against the whole purpose of providing NAT.

If you need a direct IP connection from one machine to another, you really need to bridge/have a routed IP... I am not sure/can't remember, but, I don't think it is possible to forward ICMP packets using Virtual Boxe's NAT.

share|improve this answer
    
Ok but it works with VMware. The "money talks" in this case? –  Chris_45 Dec 30 '11 at 19:14
    
I would think that unless you actually forwarded NAT ICMP (which I don't think you can do), you were only pinging the host, not the virtual machine. and if you were pinging via the NAT private IP, then, it was VMWare doing routing, not an actual ping via NAT as such. –  William Hilsum Dec 30 '11 at 20:28

Your Answer

 
discard

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.