VirtualBox has a number of networking options, default is NAT. Unlike with VMWare you cannot access the guest network ports. A possible solution is to use briged networking - the guest acts like a new node on your network. This was not the way I wanted it - I was looking for a way to achieve the VMWare-like behavior. I found Marco's "My.Debian.": There is a VBoxManage command to enable port forwarding to your running guest. You can find the details here. Basically you have to define the HostPort
VBoxManage setextradata
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
the GuestPort
VBoxManage setextradata
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
and the protocol used:
VBoxManage setextradata
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
The settings are stored in the XML definition of your vm.
Ready to go - using SSH you can tunnel all the required ports from your guest!