venerdì 21 agosto 2009

VirtualBox Port Forwarding

This is how to create a port forwarding between an host system and a guest system.
This is ideal in order to have a SSH tunnel to the guest machine, in order to tunnel vnc etc...

In this example, the host OS is windows....

cd %VIRTUAL_BOX_INSTALL_DIR%
VBoxManage.exe setextradata "%VM_NAME%" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
VBoxManage.exe setextradata "%VM_NAME%" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManage.exe setextradata "%VM_NAME%" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

Nessun commento: