Time for action – enabling port-forwarding in NAT mode
In the following exercise, I'll show you how to use the port-forwarding feature available in the NAT networking mode of your UbuntuVB virtual machine, so that your host PC can access the web server from the previous Time for action—Accessing the NAT mode in your VM section.
Note
When using the VBoxManage
command on a Windows host, you need to add the full path to the VBoxManage command; another option is to add the VirtualBox installation folder—the default being "C:\Program Files\Sun\VirtualBox\
"—to your system path.
On Linux systems, you don't have to specify the VirtualBox path when using the VBoxManage
command.
Open a Command Prompt and type the following lines, pressing Enter after each one:
"C:\Program Files\Sun\VirtualBox\VBoxManage" setextradata "UbuntuVB" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/webserver/Protocol" "TCP" "C:\Program Files\Sun\VirtualBox\VBoxManage" setextradata "UbuntuVB" "VBoxInternal/Devices/pcnet/0/LUN#0...