So here's my sample setup. I am running a LAMP server on my guest os an image of Ubuntu and for now i am only concerned about accessing the webserver on my host machine and also from other machines on the network (something that you cant do out of the box on VMWare Fusion, though i am sure it can be done on it by one means or the other).
I run the following commands:
# VBoxManage setextradata "YourImageName" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/Protocol" TCP
# VBoxManage setextradata "YourImageName" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/GuestPort" 80
# VBoxManage setextradata "YourImageName" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/HostPort" 8080
The above example assumes a Intel PRO/1000 virtual network card; if you have configured the guest to use the PCNet, replace "e1000" with "pcnet" in the above commands. Similarly, if you want to configure a different interface instance replace the /0/ with the appropriate index. pcnet and e1000 are counted separately in this respect, and counting starts at 0 for both types.
The name guesthttp is an arbitrary one chosen for this particular forwarding configuration. With that configuration in place, all TCP connections to port 8080 on the host will be forwarded to port 80 on the guest. Protocol can be either of TCP or UDP (these are case insensitive). To remove a mapping again, use the same commands, but leaving out the values (in this case TCP, 80 and 8080).
It is not possible to configure incoming NAT connections while the VM is running. However you can change the settings for a VM which is currently saved (or powered off at a snapshot).