Sunday, August 7, 2011

VirtualBox VBoxManage

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, the gateway is set to and the name server can be found at

If, for any reason, the NAT network needs to be changed, this can be achieved with the following command:

VBoxManage modifyvm "VM name" --natnet1 "192.168.61/24"

This command would reserve the network addresses from to for the first NAT network instance of "VM name". The guest IP would be assigned to and the default gateway could be found at

VBoxManage startvm "New Saratele"

Waiting for the VM to power on...
VM has been successfully started.

Port forwarding with NAT

As the virtual machine is connected to a private network internal to VirtualBox and invisible to the host, network services on the guest are not accessible to the host machine or to other computers on the same network. However, like a physical router, VirtualBox can make selected services available to the world outside the guest through port forwarding. This means that VirtualBox listens to certain ports on the host and resends all packets which arrive there to the guest, on the same or a different port.

Network Interface in Virtual Machine ( Windows Server 2008 - guest ) has IP =
Network Interface on the HOST Machine has IP = 
ping from guest to host is OK , but from host to guest KO ... 

From Linux : to acces  port 80 ( IIS service ) on the Windows Server 2008  guest : 
1.  VBoxManage modifyvm "New Saratele" --natpf1 "guest_iis,tcp,,8000,,80"

2. From host Browser :

Network & sharing in VirtualBox - Full tutorial

VBoxManage modifyvm

No comments:

Post a Comment