This procedure describes how to connect in RDP / RemoteApp from a Linux client machine, using the TSplus Load-Balancing feature and FreeRDP.
Prerequisites:
Configure the Reverse Proxy & enable Load-Balancing so all your servers can be reached from outside using https://GatewayAddress/~~APP-SERVER-NAME
The Reverse Proxy documentation is available at this location: https://docs.terminalserviceplus.com/tsplus/using-the-reverse-proxy-feature
Configure the connection as follows:
The RDP / RemoteApp .rdp template needs to be placed on the Linux client machine
The .sh script will be used on the Linux machine to:
Copy the template to the user’s profile folder -> CLIENT.rdp
Interrogate the Gateway to get the less loaded application server name by calling this URL: https://GatewayAddress/cgi-bin/hb.exe?action=lb
Add a new line to CLIENT.rdp (the target application server’s details) using the less loaded application server’s name -> /~~APP-SERVER-NAME
The first part of this procedure is the .rdp template. You can use the RDP-TEMPLATE or RemoteApp-TEMPLATE attached to this documentation depending on your needs.
If you edit the .rdp template with Notepad, you will see its configuration:
Edit Line 5 by using your Gateway server’s address
Line 6 will be the server port during the connection: in this example, it is configured to use port 443
The last line of this file MUST BE EMPTY for the Linux script to edit it using the less loaded application server’s name.
The second part of this procedure is the Linux script (also attached to this documentation).
The content of the script is as following:
In this example, the RDP-TEMPLATE.rdp placed in the administrator’s Desktop folder will be copied to the administrator’s profile folder -> CLIENT.rdp, and the last line will be edited by using the less loaded application server’s name.
Edit Line 4 using your GATEWAY address
Edit Line 20 by adding:
Domain name -> /d:
Username -> /u:
Password -> /p:
Other options : in this example, multi monitors and certificate auto-accept options will be used.
You will find here the list of the other options available with FreeRDP : https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown
URL in Line 4 uses HTTPS in this example. If you do not have an SSL certificate, then you can edit this URL using HTTP
Free certificate documentation: https://docs.terminalserviceplus.com/tsplus/free-certificate-manager
Third party certificate documentation: https://docs.terminalserviceplus.com/tsplus/https-ssl-certificates-tutorial
Once the script is edited to match your configuration, you will only need to call it from the command prompt, and the connection will be performed on the less loaded application server of your FARM.