Home » Questions » Computers [ Ask a new question ]

VirtualBox NAT port forwarding on Ubuntu 64?

VirtualBox NAT port forwarding on Ubuntu 64?

I have an Ubuntu 9.04 desktop 64-bit guest OS running on an Ubuntu 9.04 desktop 64-bit host OS (yes, the same OS). I'd like to run a web server on the guest and make it accessible through NAT on the host.

Asked by: Guest | Views: 278
Total answers/comments: 1
Guest [Entry]

"I had the same symptom when I setup up port forwarding in VirtualBox.

When I create new VMs in VirtualBox, the default network adapter is e1000, not pcnet as per the instructions you followed.

If you modify the config settings to:

VBoxManage setextradata ""<Guest Name>"" ""VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/Protocol"" TCP
VBoxManage setextradata ""<Guest Name>"" ""VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/GuestPort"" 80
VBoxManage setextradata ""<Guest Name>"" ""VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/HostPort"" 8080

This should solve your problem.

The above configuration option will work for the first e1000 adapter, hence the e1000/0 in the settings.
Double check which network adapter is being used by the VM you are trying to port forward to.

On my installation, the network adapters available are two ""PcNet"" ones and three ""Intel Pro 1000"".

The adapters are referred to by the following keys:

First PCNet: pcnet/0
Second PCNet: pcnet/1
First Intel PRO/1000: e1000/0
Second Intel PRO/1000: e1000/1
Third Intel PRO/1000: e1000/2

If your adapter is, for example, the second ""PRO/1000"" in the list, then you need to modify the above config to e1000/1 (etc)."