It can be easily done under Vmware Workstation (On the NAT tab in Virtual Network Editor, click Edit… -> Port Forwarding). Under VirtualBox, it is a bit complicated, the command /usr/bin/VBoxManage is used to do this (Both Linux & MacOSX). Details can be found below :
http://www.linux.com/community/blogs/port-forwarding-in-virtualbox-with-vboxmanage.html?blogger=Ross+Larson