• Hey there, Guest! Share your idea for a new trophy in the forums and win bragging rights and a $100 Amazon gift card! Check out the New Community Trophy Contest here!
  • Pardon our dust as we work on some regularly scheduled forum maintenance. You may notice some missing features during this time. Thank you for your patience!

How to access a VirtualBox VM guest through the internet remotely

matiasht

Distinguished
Oct 17, 2011
100
0
18,680
0
Hi, I just signed up for DynDNS through No-IP and now I can access my PC remotely anywhere through RDS built on the OS.

What I want to find out now is if I can access a VM running on my local machine ONLY.
My VM is connected to my host computer on a local network through Bridge Adapter on VirtualBox Setting.
Both guest and host are Windows 7 machines.
Any port forwaring option on Virtual Box I have to set up?

Any help?

Regards!
 

Shadow_Realm

Reputable
May 24, 2015
9
0
4,510
0
If it's setup as a bridged and has it's own internal IP address all you should have to do is turn off RDP on your main computer (As you can't really have 2 things listening onthe same port). You could always try and change the port around on the VM and see if that does the trick
 

matiasht

Distinguished
Oct 17, 2011
100
0
18,680
0
Thanks for the answer, Ill try disabling RDP on the host machine and see if it takes me to the VM directly.
How do I change the port around on the VM for RDP and how would I access through RDP on a different port?
 

matiasht

Distinguished
Oct 17, 2011
100
0
18,680
0
Ok, the port 3889 is already forwarded for the local IP address on my host machine, so everytime I do RDP I can see the host machine; so you're saying I should add the local IP of the VM into the router table. Should I remove the one from the host machine? Is there any way I can leave both and how would I choose between the two when putting my domain name into RDP?

Thanks for your answer!
 
Set up two port-forwarding rules:
Rule 1 for port 3889 goes to the IP address of the Host, port 3889
Rule 2 for port (eg) 3890 goes to the IP address of the VM, port 3889

When you set up your RDP client, you change port numbers depending on which computer you need access to. You might have to edit the .rdp file with NotePad, I am not sure whether you can specify port number using GUI.
 

matiasht

Distinguished
Oct 17, 2011
100
0
18,680
0
So this is what happens when trying to open the ports that way on my router:



So in this image you can see 192.168.0.107 is local IP address for the VM and it has it service port 3389 an internal port (3389 by default but this is editable), so I have access to the VM remotely no problems, cause the RDP port for it is open.



But when I try to open the port for the local PC...
So I put the regular service port for my local machine (the same one I did for my VM), and its local IP address 192.168.0.100



This is the error message I get, do you have any ideas on how to get this sorted? :(
 
You already have a port forwarder which listens on "Service port" 3389 (that is your external IP address) forwarding it to your host RDP.

Set up another Port Forwarding for different "Service port" (eg 4489) pointing to 192.168.0.100, port 3389. Then, from outside, setup RDP client as in my previous message, with custom 4489 port.
 

matiasht

Distinguished
Oct 17, 2011
100
0
18,680
0
So like this should take care of it right?



So in RDP I would put 192.168.0.100:4489
And to access the VM I would use 192.168.0.150:3389

Is this correct?
 
This should work.

Just out of curiosity - you a forwarding HTTP/HTTPS, SMTP and VPN traffic all to different IP addresses - do you have that many "servers" in your network? Make sure all these servers are properly protected - it would take no time for the "bad" guys to discover them and start playing games.
 

matiasht

Distinguished
Oct 17, 2011
100
0
18,680
0
The only "real machine" there is 192.168.0.100, all the others are just VMs (some of them clients, other servers) for testing purposes.
Im just basically emulating a AD DS environment with several virtual servers and hosts to test the different services and features.
 

Similar threads