0

I have a computer running a server that my subdomain on my shared hosting account points to. Meaning 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

  • Port: 4000
  • Internal IP: 192.168.1.60
  • External IP: 24.29.138.45

Ubuntu Virtual Box Server 2

  • 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.

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 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?

1
  • 2
    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, 2012 at 1:10

1 Answer 1

3

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.)

1
  • I recommend the bridged networking approach for this. That way, you only need to worry about configuring your physical router. Nov 6, 2017 at 23:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .