unable to connect to UBUNTU via rdp

Discussions related to using VirtualBox on Windows hosts.
Post Reply
emoxam
Posts: 4
Joined: 8. Dec 2021, 12:30

unable to connect to UBUNTU via rdp

Post by emoxam »

on windows 10 21h1
installed VirtualBox-6.1.30-148432-Win.exe
installed Oracle_VM_VirtualBox_Extension_Pack-6.1.30.vbox-extpack
i've installed xubuntu 20.04
checked Display > Remote Display > Enable server, using the default settings (port 3389 etc)
did sudo ufw allow 3389
VM network type is a bridge
try to telnet "xubuntu ip" 3389 and no luck
Do I need to be running any RDP-related software on the VM to be able to connect to it?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: unable to connect to UBUNTU via rdp

Post by mpack »

I find your post a tad confusing.

AFAIK, Telnet and RDP are completely unrelated protocols. But, you discuss enabling an RDP server and then trying to connect using a Telnet client. You don't mention trying RDP, the intended client protocol?

Btw, since RDP is a remote DESKTOP protocol it is implicitly assumed that the VM will be using a desktop based GUI. I assume that isn't a problem.

Also, I assume that the VirtualBox RDP feature doesn't care what type of network connection you have between host and VM (you mentioned "bridged"). I assume the VirtualBox feature will be a host application listening on host TCP port 3389, if it gets a connection there it will presumably relay comms to the guest using VBoxSVC, the normal background VM comms interface.

If all you want is Telnet, i.e. a text based connection, then AFAIK all you require is a TCP/IP connection and a telnet client such as "PuTTY". You don't need help from VirtualBox. But you still couldn't connect using Telnet to a TCP port 3389 configured to listen for RDP connections.

Finally, if you want to RDP into a Linux guest I have had good luck installing xrdp, the generic RDP server for Linux. Again, this requires no help from special VirtualBox features - but I would not enable both.
emoxam
Posts: 4
Joined: 8. Dec 2021, 12:30

Re: unable to connect to UBUNTU via rdp

Post by emoxam »

Telnet is widly using for testing connection, if telnet doesnt work on port 3389 no need to check will RDP work with this port.
So telnet doesn't work.
Should RDP on ubuntu work after i attached VBoxGuestAdditions.iso into it and installed via /media/emoxam/VBox_GAs_6.1.30/autorun.sh ?
Or how to make it work ?

xrdp works, is it by design - install xrdp ?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: unable to connect to UBUNTU via rdp

Post by scottgus1 »

I think I see the problem:
emoxam wrote:checked Display > Remote Display > Enable server, using the default settings (port 3389 etc)
did sudo ufw allow 3389
VM network type is a bridge
try to telnet "xubuntu ip" 3389 and no luck
The first line "checked Display > Remote Display > Enable server etc" is for Virtualbox's RDP server (VRDP). VRDP can be thought of as an RDP-enabled KVM switch, completely independent of the installed VM OS. VRDP connects to the VM's "monitor", not the VM's OS. VRDP can allow remote control of any VM, regardless of installed OS, including non-RDP OS's like DOS, or even if there is no OS installed in the VM.

VRDP is served from the host, not the VM OS. So to access VRDP, one uses the host's IP or loopback address then the port number:

for an RDP client running on the host also: 127.0.0.1:VRDPport#

for an RDP client running on the LAN: host.LAN.IP.address:VRDPport# (the host's firewall should be opened for VRDPport#)

In your setup, you enabled VRDP (being served from the host), but you then opened the VM OS's firewall and tried to telnet to the VM OS. So you're trying to telnet an OS that hasn't got an RDP server set up yet.

You have two choices:
  1. enable an RDP server inside Xubuntu on port 3389, then your existing telnet might work, and an RDP client ought to work, when either is aimed at Xubuntu.IP.add.ress:3389. You won't be remoting into VRDP in this case, so all the authentication requirements for the Xubuntu RDP server will apply.

    - or -
  2. change the IP address in your command to the host's IP address per the channels shown above, and open the port in the host firewall. An RDP client should work. I don't know if VRDP will respond to telnet.
Two other things to consider:

VRDP has several authentication methods. NULL is no authentication but is the easiest to use for testing. No username or password is needed.

Port 3389 is also Windows' default RDP port number. So if you intend to continue using VRDP you might have a conflict by using the same port number as the host expects to use. I'd pick a different port number than 3389 for VRDP on a Windows host. 3390 up into the 4000's offer plenty of alternatives.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: unable to connect to UBUNTU via rdp

Post by mpack »

emoxam wrote: xrdp works, is it by design - install xrdp ?
xrdp has nothing to do with the VirtualBox vRDP feature. But if xrdp provides the features you need then certainly you can use that.

Please understand that VirtualBox is an application running on your host, and animating several windows which the virtual monitors control. The vRDP service is a host server application that lets you see the contents of those windows and otherwise interact with the associated VM OS. This is not at all the same as running an RDP server inside the guest OS.

xrdp is running a server inside the guest OS. The effect may look similar, but the location of the server is different, and now your networking choices will matter. Guest Additions however are not involved.
emoxam
Posts: 4
Joined: 8. Dec 2021, 12:30

Re: unable to connect to UBUNTU via rdp

Post by emoxam »

who would have thought! I need to connect to 127.0.0.1 from the windows 10 PC. And yes, i've changed to 3900. It works.
But without any hardware accesseration? WIndows brakes when i moving them..
Console works smother
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: unable to connect to UBUNTU via rdp

Post by scottgus1 »

emoxam wrote:without any hardware accesseration?
That's correct. VRDP has to serve whatever the "monitor" is displaying without any pre-processing from the VM's OS, since VRDP does not touch the VM's OS.

For better RDP, use choice 1 above.
emoxam
Posts: 4
Joined: 8. Dec 2021, 12:30

Re: unable to connect to UBUNTU via rdp

Post by emoxam »

it's not go sood also.
but thank. issue is solved.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: unable to connect to UBUNTU via rdp

Post by scottgus1 »

Great! Glad you're up and running.
Post Reply