10.7. Procedure – Using PSM as a Remote Desktop Gateway

Purpose: 

Remote Desktop Gateway is a role service in the Remote Desktop Services server role that allows authorized remote users to connect to resources located on an internal or private network from any Internet-connected device. The accessible resources can be terminal servers, remote applications, remote desktops, and so on.

The Remote Desktop Gateway Server Protocol is a remote procedure call (RPC) protocol using HTTPS as the transport mechanism, used primarily for tunneling client to server traffic across firewalls. The Balabit’s Privileged Session Management, Shell Control Box can act as a Remote Desktop Gateway, receiving connections using the Remote Desktop Gateway Server Protocol and transferring them to the target servers using the RDP protocol.

The Remote Desktop Gateway Server Protocol enables inband destination selection, meaning that PSM can extract the address of the target server from the client connections. This greatly simplifies managing connections on PSM without having to encode the name of the target server in the username, which was problematic as the length of the username is limited on many platforms — especially in non-transparent mode.

Prerequisites: 

  • To access remote servers using a Remote Desktop Gateway, the clients must use version 6.1 or newer of the Remote Desktop application. Note that officially only version 6.0 is available for the Windows 2003 Server operating system, though it is possible to install a newer version. However, this is a problem only when initiating RDP connections from the Windows 2003 Server host, not when the Windows 2003 Server is the target of the connection.

  • PSM must be a member of a Windows Domain (for details on joining a domain, see Procedure 10.3.1, Network Level Authentication (NLA) with domain membership), or you must use a Local User Database (for details, see Procedure 7.13, Creating a Local User Database).

  • Ensure that the system times of the Domain Controller, the target servers, the clients, and PSM are synchronized.

  • Gateway authentication on the PSM web interface cannot be used for connection policies that use PSM as a Remote Desktop Gateway. However, the Remote Desktop applications of the clients can be configured to perform two separate authentications, one on the Remote Desktop Gateway (that is, on PSM), and one on the target server. For details on configuring the Remote Desktop applications of the clients to perform gateway authentications, see Procedure 10.8, Configuring Remote Desktop clients for gateway authentication.

  • The Remote Desktop Gateway Server Protocol supports various authentication methods. PSM acting as a Remote Desktop Gateway supports only NTLM authentication.

  • PSM can be used as a Remote Desktop Gateway. The terminal service clients must be configured to use PSM as the Remote Desktop Gateway. PSM will connect the server (selected inband) after authentication.

  • Remote Desktop Gateway will require a certificate. Decide whether you want to use a fix certificate, or an on-the-fly generated certificate before performing the steps below and prepare the certificate.

  • You may also need to adjust the port settings of the connections. The default port for RDP connections is 3389, but the Remote Desktop Gateway Server Protocol uses port 443. However, the PSM web interface uses port 443 as well, and other connection policies might already use port 443. Therefore, if administrator or user login is enabled on the interface that receives the Remote Desktop Services connections, add a new alias IP address to the interface of PSM and use this alias in your connection policy and the client configurations. For details on creating IP aliases on PSM, see Procedure 4.3.2, Managing logical interfaces.

Steps: 

  1. Navigate to RDP Control > Connections and create a new connection policy that will handle the incoming client connections that use the Remote Desktop Gateway Server Protocol.

  2. Enable the Act as a Remote Desktop Gateway option.

    Figure 10.6. RDP Control > Connections — Configuring PSM as a Remote Desktop Gateway (or RD Gateway)

    RDP Control > Connections — Configuring PSM as a Remote Desktop Gateway (or RD Gateway)
  3. Set the target of the connections.

    • To direct every incoming connection to a single target server, select Use fix address and specify the address of the target server.

    • To extract the destination address from the Remote Desktop Gateway Server Protocol, select Inband destination selection and set the address of the servers the clients are allowed to access in the Target > Domain fields. For details on using inband destination selection, see Procedure 7.2, Modifying the destination address.

    Note

    In non-transparent mode, enter the IP address generated for the Remote Desktop Gateway service into the To field. Do not enter the IP address configured for administrator or user login.

  4. To act as a Remote Desktop Gateway, PSM needs to display a certificate to the clients.

    • To display always the same certificate, select Use the same certificate for every connection and upload the X.509 certificate and the matching private key.

      Balabit recommends using 2048-bit RSA keys (or stronger).

      Warning

      The Common Name (CN) of the certificate must be the FQDN of PSM, which is the address of the Remote Desktop Gateway specified in the client applications. Otherwise the clients will reject the connections.

    • To automatically create new certificates on PSM for every client, select Generate certificate on-the-fly, then select the Certificate Authority (CA) to sign the generated certificates with from the Signing CA field. For details on creating a signing CA, see Procedure 7.12, Signing certificates on-the-fly.

      By default, the Common Name (CN) of the generated certificate is <PSM-hostname.domainname>. You can set a custom Common Name in the Custom Common Name field.

      Note

      Save the CA certificate used to sign the certificate that PSM shows into DER format and import it to the clients into the Local Computer > Trusted Root Certificate store of the clients so that the clients can verify the identity of PSM.

    • To use Active Directory for authentication, select Active Directory.

    • To use a Local User Database for authentication, select Local User Database, enter the Domain, and select the Local User Database from the list.

  5. Configure other parameters of the connection policy as needed for your environment.

  6. Click .