Ok, eu tenho a solução, apenas mudei minha conexão do NAT para a rede Bridge / NAT. Na caixa virtual documentação .
NAT EXPLANATION
Network Address Translation (NAT) is the simplest way of accessing an external network from a virtual machine. Usually, it does not require any configuration on the host network and guest system. For this reason, it is the default networking mode in VirtualBox.
A virtual machine with NAT enabled acts much like a real computer that connects to the Internet through a router. The "router", in this case, is the VirtualBox networking engine, which maps traffic from and to the virtual machine transparently. In VirtualBox this router is placed between each virtual machine and the host. This separation maximizes security since by default virtual machines cannot talk to each other.
The disadvantage of NAT mode is that, much like a private network behind a router, the virtual machine is invisible and unreachable from the outside internet; you cannot run a server this way unless you set up port forwarding (described below).
BRIDGE EXPLANATION
With bridged networking, VirtualBox uses a device driver on your host system that filters data from your physical network adapter. This driver is therefore called a "net filter" driver. This allows VirtualBox to intercept data from the physical network and inject data into it, effectively creating a new network interface in software. When a guest is using such a new software interface, it looks to the host system as though the guest were physically connected to the interface using a network cable: the host can send data to the guest through that interface and receive data from it. This means that you can set up routing or bridging between the guest and the rest of your network.
E parece que, quando definimos a conexão da VM com o NAT, ela nos fornecerá um IP estático padrão como 10.0.2.15
com gateway 10.0.2.2
com base nessa tópico .
Como eu disse na minha pergunta (citado):
I tried that on my own virtual box. It's run like normal, but the problem is i always got the ip of my friend DHCP IP for my virtual machine.
Eu disse que o IP 10.0.2.15
é o IP anterior dos meus amigos, enquanto estava incorreto, pois o 10.0.2.15
IP era, na verdade, um IP estático padrão fornecido automaticamente pelo aplicativo VirtualBox quando você usava a conexão NAT da sua máquina virtual .
No tópico relacionado, disse:
In NAT mode, the guest network interface is assigned to the IPv4 range 10.0.x.0/24 by default where x corresponds to the instance of the NAT interface +2. So x is 2 when there is only one NAT instance active. In that case the guest is assigned to the address 10.0.2.15, the gateway is set to 10.0.2.2 and the name server can be found at 10.0.2.3.