I am trying to debug the problem, I understand the difference between the NAT network adapter in VirtualBox and the NAT network adapter in VMWare Fusion. While I can configure VMWare and achieve the desired result, but I can not achieve this in VirtualBox. In VMWare VM, I can use the NAT network adapter to achieve the following goals:
- Guest has their own unique IP address
- The guest has access to external internet.
- The host can do ping guest and ssh for it
- Guest can ping host and ssh.
- A guest can resolve (internal) domain names just like a host
I thought I saw that this was possible in VirtualBox, but now I think it is not possible. Perhaps there is some kind of option close to VMWare in which I manually change /etc/resolv.confin the guest system to match the host setting? I found several questions that seem to indicate that I should use Bridged mode in VirtualBox, for example. this question: It is not possible to ping for a VirtualBox instance in which both answers show that the VirtualBox NAT adapter does not support the functionality that I want:
Obviously, when you use NAT, it will not be possible to ping the node after NAT. This is how NAT works ... even if you have a real non-virtual host, bechaviour will be the same.
and
NAT , ping .
, , , : ping ubuntu guest VirtualBox
, NAT- VirtualBox -?