How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.0.1?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.0.1?

Post by jmar83_the2nd »

Is that possible? Host is Windows 10 Pro x64 with VirtualBox 6.0.22, guest is Debian 9...

The windows firewall doesn't seems to be the problem, because i allowed incoming connections to TCP port 9004 (configured on the VM properties)

Thank you for your feedbacks.
regards, jan
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by scottgus1 »

I can access Virtualbox RDP to a guest from the host either by 127.0.0.1:portnumber or host.ip.add.ress:portnumber. I do not seem to be blocked by the host's firewall.

example: guest set to port 9004 in Display Remote settings
RDP connection started on the host OS works on:
127.0.0.1:9004
192.168.0.116:9004

Can you explain a little more what you want to see?
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by jmar83_the2nd »

to telnet the host-machine-adapter IP (so not 127.0.0.1 or localhost) on the host itself works...

I think i will better solve the problem with an RDP-compatible daemon on the VM itself, e.g. xrdp...
regards, jan
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by scottgus1 »

OK, telnet isn't RDP, so the guest would need its own port open for telnet. Virtualbox does not have a telnet server for its guests (that I know of), so this would be between the host & guest over some sort of network.

If the guest is set to NAT or NAT network, you would open the unique desired telnet port in the NAT's port forwarding, then access the telnet port by host.ip.add.ress:portnumber.

If the guest is set to Bridged or Host-Only, you need to telnet to the guest's ip address.
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by jmar83_the2nd »

But telnet can test it if on the TCP port runs a service.

No, it's no NAT, it's a "normal" bridge, so same subnet
regards, jan
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by scottgus1 »

I'm still a little unclear on exactly what you are trying to do, sorry. I must be fuzzy in the brain today.

But I know that when a guest is on Bridged it acts exactly as if it was on the LAN along with all the other computers, including the host. See Virtualbox Networks: In Pictures: Bridged Adapter

So if you can imagine two physical computers side-by-side on a LAN and figure out how to RDP/telnet/port-test to computer A's network card by operating against computer B's ip address, then you can apply the same solution to a Bridged host and guest.
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by jmar83_the2nd »

"So if you can imagine two physical computers side-by-side on a LAN and figure out how to RDP/telnet/port-test to computer A's network card by operating against computer B's ip address, then you can apply the same solution to a Bridged host and guest."

Yes, usually...

But i don't know what's the problem on my system, so i said, the Windows 10 firewall is open (because the VirtualBox RDP feature comes from the VM host, right?), but it doesn't work.

Maybe the problem is "phpvirtualbox", that changed the VirtualBox behavior. (?)
regards, jan
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by scottgus1 »

jmar83_the2nd wrote:VirtualBox RDP feature comes from the VM host, right?
Yes, it does. Using Virtualbox RDP I can remote into a DOS guest with no network.
jmar83_the2nd wrote:Maybe the problem is "phpvirtualbox"
All bets are off if you have programs that modify Virtualbox. Also rans include Vagrant & Docker.
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by jmar83_the2nd »

Thank you for your feedback.

Yes, i will test it one day (when i have the time) with a clean new installation!
regards, jan
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: How to bind a VM's RDP Port (=on host IP, not on guest) on physical adapters, not just on 127.0.

Post by scottgus1 »

Sounds good! Let us know if you run into any trouble.
Post Reply