In a Guest OS with NAT network, out going traffic will show the host IP address. we use this mainly for access something form the guest OS. But some times we want to access the guest OS from the network. Normal case this is not possible and will reach only up to the Host server.
It is possible through a Port forwarding.
We have tested this in a ubuntu Host With Windows Xp guest OS. Here we will access Remote desktop of the XP ( Guest OS ) from the network.
IP : 192.168.0.1
When we try Remote desktop to 192.168.0.1 it will not connect to XP. Just drop the packet from Host OS ( Ubuntu ). We can do pot forwarding with following three commands.
VBoxManage setextradata “XP Test” “VBoxInternal/Devices/pcnet/0/LUN#0/Config/rdp/Protocol” TCP
VBoxManage setextradata “XP Test” “VBoxInternal/Devices/pcnet/0/LUN#0/Config/rdp/GuestPort” 3389
VBoxManage setextradata “XP Test” “VBoxInternal/Devices/pcnet/0/LUN#0/Config/rdp/HostPort” 3389
You have to change the following according to your need,
Windows Remote desktop Port : 3389
Host OS name : XP Test
Service : RDP
Now restart the Sun Virtual Box and Start the Guest OS
Port forwarding is enabled, when you Access Remote Desktop to 192.168.0.1 it Host OS will forward port 3389 to the Guest Os. and you can access XP Desktop.this port forwarding is happening on virtual box Layer