Making VirtualBox public

Discussions related to using VirtualBox on Windows hosts.
Post Reply
BrianMolidor
Posts: 1
Joined: 21. Oct 2007, 04:45

Making VirtualBox public

Post by BrianMolidor »

I have a Windows 2003 Server with a public IP Address (let's call it a.b.c.d). On this server I am running VirtualBox>Ubuntu.

How would I be able to connect to an App that is running in Ubuntu on port 1234?

http://a.b.c.d:1234 will not route into VirtualBox>Ubuntu, The request hit's Windows and stops there.

Can this be done?
abcuser
Volunteer
Posts: 590
Joined: 10. May 2007, 20:03
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows XP

Post by abcuser »

Hi,
you didn't wrote the VirtualBox version.

The main idea when using NAT (probably you are using this type of network connection, because it is default) is mapping host port to guest port.

In VirtualBox 1.5.2 there is port mapping in NAT network configuration. Read more in VirtualBox Manual. You can download PDF from: http://www.virtualbox.org/wiki/Downloads

Sample code from Manual (replace guestssh with your program name and ports 22 and 2222). You can have the same ports on host and guest or different one, just map ports.

VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222

Hope this helps,
Abcuser
Post Reply