Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a computer running a server that my subdomain on my shared hosting account points to. IE subdomain.mydomain.org goes to my home server. Now then; what I'm wanting to do is be able to access my VirtualBox servers through that subdomain and a different port. E.G

Ubuntu Virtual Box Server 1
Username:Ubuntuhost1
Password:MyUbuntuHost1
Port:4000
Internal IP: 192.168.1.60
External IP: 24.29.138.45

Ubuntu Virtual Box Server 2
Username:UbuntuHost2
Password:MyUbuntuHost2
Port:4001
Internal IP: 192.168.1.61
External IP: 24.29.138.45

Now I want to be able to access RDP number 1 through Port 4000, but if I access Port 4001 it will connect to the server on port 4001; both using the same subdomain.

The next issue is the fact that even though I know what the IP addresses are on the router for the virtualbox hosts through ifconfig it doesn't change the fact that they don't show up on the router.

If anyone knows how to configure this to work please help me out because I've been racking my brain to the highest extent I can.

Alright; here's an edit to clarify more; Sorry. My ports on the router are edited to forward Port 4000 on Internal IP 192.168.1.63 (My Ubuntu Internal IP address)

Now when I go to my Router Home Page my VirtualBox Internal IP Address doesn't show on the attached device listings, so I set up port forwarding anyways to the VirtualBox Internal IP. My end goal is when I connect to mydomain.org and I connect through port 3389 it takes me to my host computers server, but if I put in mydomain.org and go through port 4000 it's going to redirect to my VirtualBox server; Is this even possible? Sorry; I'm trying to clarify the most I think I can I just don't know how else to explain my issue.

share|improve this question
1  
It is difficult from your description to understand exactly what the problem is. Perhaps edit and clarify? You seem to suggest you have port forwarding setup for both machines on different ports, so what exactly isn't working? And what do you mean by them not showing up on the router? –  Paul May 28 '12 at 1:10
add comment

2 Answers 2

There are several way to this. You can choose NAT for the network interfaces in VirtualBox (which is the default setting). Then edit the port forwarding in VirtualBox so the right ports are forwarded to the right virtual machine. The (physical) router should forward the ports to 192.168.1.63. (Just as your physical router does masquerading for the address 24.29.138.45, VirtualBox will do masquerading for 192.168.1.63.)

Another way to do it is to choose bridged for the network interfaces in VirtualBox. Then configure the router to forward the ports to 192.168.1.60 and 192.168.1.61. (Your virtual machines will appear as independant hosts on your LAN beside your Ubuntu machine.)

share|improve this answer
add comment

In the Settings-> Network Choose brigded network, this will allow to create an IP which you can see by androVm Configration application in the virtual box. Now in cmd from other computer, type ping . Now you can see your solution.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.