Hello Devolutions team,
I have multiple android phone-like devices with installed VNC server. Unfortunately it`s not possible to connect directly to them without using tunnel through the main server.
I used to make separate tunnels for each of them, but it`s much easier to do it with dynamic tunnel and SOCKS.
What I do now is setup a dynamic SSH tunnel D1234 through server 123.4.5.6:22 using Putty. Then I use VNC Viewer from RealVNC and set proxy to "Server:127.0.0.1:1234" with proxy type SOCK5 as seen below. And that`s it - I can now access the device with it`s actual IP say 111.11.1.1. I can even connect to more devices at a time using one dynamic tunnel which is quite cool.
Is there a simple way to do this in RDM? Let`s say create one "SSH Tunnel" session with dynamic tunnel D1234 and then separate "VNC" sessions that would use the SOCKS proxy? Or even better, encorporate the tunnel and proxy settings in single "VNC" session?
My version of RDM is 2022.1.12.0
Tunnel and proxy settings:
Session properties:
Thank you,
JJ
Hello,
Thank you for contacting us on that matter!
Allow me to consult our engineering team regarding your request, as I have some questions for them before being able to provide you a more substantial answer.
I will get back to you as soon as I hear back from them!
Best regards,
Gabriel Degrandpré
Hello,
I apologize for the delay since my last response, I was waiting on some information from a colleague.
According to our engineering team, it should be possible to configure the setup you are looking for. Although I have to admit that I have not tested it on our side beforehand, as I do not have the necessary environment, I'm pretty positive this should work.
First of all, for the VNC connection, I would recommend to use the External display mode. This will allow RDM to launch your VNC session in an actual VNC application instead of our embedded integrations, which are a bit more limited. This will give you some additional choices in the "VNC application" drop-down, including RealVNC.
For the SSH tunnel, once you have configured your SSH Tunnel entry and confirmed that it works as expected, you can link it to your VNC session, in the properties of the VNC entry, under the VPN/SSH/Gateway section. Set the "Type" option to Session and the "Connect" option to Always Connect. Then, in the "Settings (Session)" tab, you will be able to select your SSH Tunnel entry. Alternatively, you could also set the "Type" to SSH and use the "Settings (SSH)" tab to configure your SSH tunnel directly in the VNC entry.
Finally, for the proxy settings, the colleague that I consulted tells me that this part will most likely have to be configured manually in the VNC session (pointing to the local port configured in the SSH Tunnel). We couldn't find an option to automate this part.
Let me know if that helps, and if you have any additional questions!
Best regards,
Gabriel Degrandpré
Hello,
Thank you for contacting us on that matter!
Allow me to consult our engineering team regarding your request, as I have some questions for them before being able to provide you a more substantial answer.
I will get back to you as soon as I hear back from them!
Best regards,
Hello Willard,
It seems that we only received the quote of Gabriel's message and not what you wanted to add to it. Could you please write a second post?
Best regards,
James Lafleur
Hello Gabriel,
thank you very much. I`m glad I asked, because the solution works. I now have one SSH tunnel session and mulitple VNCs linked to it.
Proxy settings in my RealVNC is global, but I believe it can be set per session using RealVNC`s config files. Didn`t try..
However, I found two drawbacks which I somehow solved.
So for future generations, here is my setup using Gabriel`s steps and my workarounds:
If you create multiple VNC entries in RDM using Duplicate function, the VPN/SSH/Gateway setting is sometimes not set correctly. Simple batch edit is all it takes (Edit entries (General settings) and then steps 4, 5, 6).
That should be it.
JJ
Hello,
I apologize for the delay since my last response, I was waiting on some information from a colleague.
According to our engineering team, it should be possible to configure the setup you are looking for. Although I have to admit that I have not tested it on our side beforehand, as I do not have the necessary environment, I'm pretty positive this should work.
First of all, for the VNC connection, I would recommend to use the External display mode. This will allow RDM to launch your VNC session in an actual VNC application instead of our embedded integrations, which are a bit more limited. This will give you some additional choices in the "VNC application" drop-down, including RealVNC.
For the SSH tunnel, once you have configured your SSH Tunnel entry and confirmed that it works as expected, you can link it to your VNC session, in the properties of the VNC entry, under the VPN/SSH/Gateway section. Set the "Type" option to Session and the "Connect" option to Always Connect. Then, in the "Settings (Session)" tab, you will be able to select your SSH Tunnel entry. Alternatively, you could also set the "Type" to SSH and use the "Settings (SSH)" tab to configure your SSH tunnel directly in the VNC entry.
Finally, for the proxy settings, the colleague that I consulted tells me that this part will most likely have to be configured manually in the VNC session (pointing to the local port configured in the SSH Tunnel). We couldn't find an option to automate this part.
Let me know if that helps, and if you have any additional questions!
Best regards,
Hello
Thanks so much for the detailed feedback and we're glad that the proposed solution works for you.
I'd like to try and address the pain points in this scenario.
For Step 2 (drawback #1), we'll have to investigate if there's a way to invoke the external RealVNC application and provide the password directly from RDM when using this setup. It might be something that can be fixed inside RDM (easier) or may require a more detailed analysis of RealVNC (harder), but I'll open a ticket for that.
For Step 6 (drawback #2), I have a hunch this might be related to how RDM manages external processes. Without an API to use, we have to fallback to manually inspecting the processes active windows to determine if the session is running yet. This is somewhat heavy as it requires inspecting the systems top-level window handles. I'll check if this is the case and see what we can to improve things.
As a side note - I wonder if there's a specific functionality or feature that you require from the RealVNC Viewer? It might be possible to achieve the same workflow using an embedded application type (UltraVNC or our own implementation, freevnc), and that would offer a tighter and smoother integration. If there's something you depend on in RealVNC that you can't accomplish with another application type, I'd be interested as it would help us prioritize features for the embedded types.
I hope that all makes sense, but if you have further questions or comments please don't hesitate to comment back.
Thanks once again,
Richard Markievicz
Hello,
I would definitely like to use embedded application in RDM. Reason I use external RealVNC is that I wasn`t able to set the proxy setting right in RDM. It is the last step to connect to the device.
I wrote it in detail in the first post - it`s necessary to use SOCKS5 proxy which will use the dynamic tunnel. There is a setting in RDM VNC entry in Advanced tab, "Proxy host:port", but without possibility to set SOCKS5. Honestly, I`m not even sure if this is the proxy setting I`m looking for.
RealVNC sets the proxy globaly, which is not ideal but works for me. So whenever I run VNC from RDM it opens session with RealVNC global proxy setting.
JJ
Hello
Thanks so much for the detailed feedback and we're glad that the proposed solution works for you.
I'd like to try and address the pain points in this scenario.
For Step 2 (drawback #1), we'll have to investigate if there's a way to invoke the external RealVNC application and provide the password directly from RDM when using this setup. It might be something that can be fixed inside RDM (easier) or may require a more detailed analysis of RealVNC (harder), but I'll open a ticket for that.
For Step 6 (drawback #2), I have a hunch this might be related to how RDM manages external processes. Without an API to use, we have to fallback to manually inspecting the processes active windows to determine if the session is running yet. This is somewhat heavy as it requires inspecting the systems top-level window handles. I'll check if this is the case and see what we can to improve things.
As a side note - I wonder if there's a specific functionality or feature that you require from the RealVNC Viewer? It might be possible to achieve the same workflow using an embedded application type (UltraVNC or our own implementation, freevnc), and that would offer a tighter and smoother integration. If there's something you depend on in RealVNC that you can't accomplish with another application type, I'd be interested as it would help us prioritize features for the embedded types.
I hope that all makes sense, but if you have further questions or comments please don't hesitate to comment back.
Thanks once again,
Hello again
Thanks for the confirmation. I'm going to enter a ticket to investigate this on our side, and I'll post back to this thread once I have an update.
Thanks and kind regards,
Richard Markievicz