Citrix Gateway

RDP Proxy

RDP Proxy Overview and Enhancements through Citrix Gateway

The following RDP Proxy features provide access to a remote desktop farm through Citrix Gateway:

  • Secure RDP traffic through clientless VPN or ICA Proxy mode (without Full Tunnel).

  • Single sign on (SSO) to RDP servers through Citrix Gateway. Also provides an option to disable SSO if needed.

  • Enforcement (SmartAccess) feature, where the Citrix ADC administrators can disable certain RDP capabilities through the Citrix Gateway configuration.

  • Single/Stateless(Dual) Gateway solution for all needs (VPN/ICA/RDP/Citrix Endpoint Management).

  • Compatibility with native Windows MSTSC client for RDP without the need for any custom clients.

  • Use of existing Microsoft-provided RDP client on MACOSX, iOS, and Android.

Deployment Overview

The following figure depicts an overview of the deployment:

RDP proxy overview

The RDP Proxy functionality is provided as part of the Citrix Gateway. In a typical deployment, the RDP client runs on a remote user’s machine. The Citrix Gateway appliance is deployed within the DMZ, and the RDP server farm is in the internal corporate network.

The remote user

  1. connects to the Citrix Gateway public IP address
  2. establishes an SSL VPN connection
  3. authenticates
  4. accesses the remote desktops through the Citrix Gateway appliance

The RDP-proxy feature is supported in clientless VPN and ICA Proxy modes.

Note:

Citrix Gateway does not support Remote Desktop Session Host (RDSH), Remote App, RDS multiuser, or RDP sessions.

Deployment Through clientless VPN

In this mode the RDP links are published on the Gateway home page or portal, as bookmarks, through the add vpn url configuration or through an external portal. The user can click these links to get access to the Remote Desktop.

Deployment Through ICA Proxy

In this mode a custom home page is configured on the Gateway VIP by using the wihome parameter. This home page can be customized with the list of Remote desktop resources that the user is allowed to access. This custom page can be hosted on Citrix ADC, or if external, it can be an iFrame in the existing Gateway portal page.

In either mode, after the user clicks the provisioned RDP link or icon, an HTTPS request for the corresponding resource arrives at the Citrix Gateway. The Gateway generates the RDP file content for the requested connection and pushes it to the client. The native RDP client is invoked, and it connects to an RDP listener on Gateway. Gateway does SSO to the RDP server by supporting enforcement (SmartAccess). The gateway blocks client access to certain RDP features, based on the Citrix ADC configuration, and then it proxies the RDP traffic between the RDP client and the server.

Enforcement Details

The Citrix ADC administrator can configure certain RDP capabilities through the Citrix Gateway configuration. Citrix Gateway provides the “RDP enforcement” feature for important RDP parameters. Citrix ADC ensures that the client cannot enable blocked parameters. If the blocked parameters are enabled, the RDP enforcement feature supersedes the client-enabled parameters, and they are not honored.

Important: Enforcement feature is applicable only if SSO is enabled.

Supported RDP Parameters for Enforcement

Enforcement for following redirection parameters is supported. These parameters are configurable as part of an RDP client profile.

  • Redirection of ClipBoard

  • Redirection of Printers

  • Redirection of Disk Drives

  • Redirection of COM ports

  • Redirection of PNP devices

Connection Flow

Connection flow can be divided into two steps:

  • RDP resource enumeration and RDP file download.

  • RDP Connection launch.

Based on the preceding connection flow, there are two deployment solutions:

  • Stateless (Dual) gateway solution - the RDP resource enumeration and RDP file download happens through the authenticator gateway but RDP connection launch happens through the RDP Listener gateway.

  • Single gateway solution - the RDP resource enumeration, RDP file download, and RDP connection launch happen through the same gateway.

Stateless (Dual) Gateway Compatibility

The following figure depicts the deployment:

Dual gateway compatibility

  • A User connects to the Authenticator Gateway VIP and provides the credentials.

  • After a successful login to the gateway, the user is redirected to the home page or external portal, which enumerates the remote desktop resources that the user can access.

  • Once the user selects an RDP resource, the Authenticator Gateway VIP receives the request in the format https://vserver-vip/rdpproxy/rdptarget/listener indicating the published resource that the user clicked. This request has the information about the IP address and port of the RDP server that the user has selected.

  • The Authenticator Gateway processes the /rdpproxy/ request. Because the user is already authenticated, this request comes with a valid Gateway cookie.

  • The RDPTarget and RDPUser information is stored on the STA server, and an STA Ticket is generated. The information stored on the STA server is encrypted by using the configured pre-shared key. The Authenticator Gateway uses one of the STA servers that is configured on the gateway virtual server.

  • The ‘Listener’ info obtained in the /rdpproxy/ request is put into the .rdp file as the “fulladdress,” and the STA ticket (pre-pended with the STA AuthID) is put into the .rdp file as the “loadbalanceinfo.”

  • The .rdp file is sent back to the client end-point.

  • The native RDP client launches and connects to the RDPListener Gateway. It sends the STA ticket in the initial packet.

    The RDPListener Gateway validates the STA ticket and obtains the RDPTarget and RDPUser information. The STA server to be used is retrieved by using the ‘AuthID’ present in the loadbalanceinfo.

Single Gateway Compatibility

The following figure depicts the deployment:

Single gateway compatibility

In the case of a single gateway deployment, the STA server is not required. The authenticator gateway encodes the RDPTarget and the Citrix ADC AAA session cookie securely and sends them as the loadbalanceinfo in the .rdp file. When the RDP Client sends this token in the initial packet, the authenticator gateway decodes the RDPTarget information, looks up the session, and connects to the RDPTarget.

License Requirements for RDP Proxy

Premium edition, Advanced edition

Note: RDP Proxy function is not available to customers who have only a Gateway platform license or only the Standard edition.

RDP proxy feature must be enabled for RDP proxy to work.

enable feature `rdpProxy`

Configuration Steps

The high level configuration steps are listed as follows:

  1. Enable the feature
  2. Create Bookmarks on the Gateway portal or use a customized Gateway portal that enumerates RDP resources
  3. Configure an RDP Client Profile
  4. Configure an RDP Server Profile

Enable the Required Features and Modes

  • enable ns feature ssl

  • enable ns feature sslvpn

  • enable ns feature rdpproxy

  • enable mode usnip

Creating Bookmarks

  1. Create bookmarks on the portal page to access the RDP resources: (The actualURL starts with rdp://).

  2. Add VPN url <urlName> <linkName>  <actualURL>

    • The URL must be in the following format: rdp://<TargetIP:Port>.
    • For Stateless RDP proxy mode, The URL must be in the following format: rdp://<TargetIP:Port>/<ListenerIP:Port>

    • The URL is published on the portal in the format: https://<VPN-VIP>/rdpproxy/<TargetIP:Port> https://<VPN-VIP>/rdpproxy/<TargetIP:Port>/<ListenerIP:Port>
  3. Bind the bookmarks to the user, or group, or the VPN virtual server, or VPN global.

Configuring a Client Profile

Configure the client profile on the authenticator gateway. The following is a sample configuration:

add rdpClient profile <name> [-addUserNameInRdpFile ( YES | NO )] [-audioCaptureMode ( ENABLE | DISABLE )] [-keyboardHook <keyboardHook>] [-multiMonitorSupport ( ENABLE | DISABLE )] [-psk <string>] [-rdpCookieValidity <positive_integer>] [-rdpCustomParams <string>] [-rdpFileName <string>] [-rdpHost <optional FQDN that will be put in the RDP file as ‘fulladdress>] [-rdpUrlOverride ( ENABLE | DISABLE )] [-redirectClipboard ( ENABLE | DISABLE )] [-redirectComPorts ( ENABLE | DISABLE )] [-redirectDrives ( ENABLE | DISABLE )] [-redirectPnpDevices ( ENABLE | DISABLE )] [-redirectPrinters ( ENABLE | DISABLE )] [-videoPlaybackMode ( ENABLE | DISABLE )]

Associate the RDP client Profile with the VPN virtual server.

This can be done either by configuring a sessionAction+sessionPolicy or by setting the global VPN parameter.

Example:

add vpn sessionaction <actname> -rdpClientprofile <rdpprofilename>

add vpn sessionpolicy <polname> NS_TRUE <actname>

bind vpn vserver <vservername> -policy <polname> -priority <prioritynumber>

OR

set vpn parameter –rdpClientprofile <name>

Configuring a Server Profile

Configure the server profile on the listener gateway.

add rdpServer Profile <profilename> -rdpIP <IPV4 address of the RDP listener> -rdpPort <port for terminating RDP client connections> -psk <key to decrypt RDPTarget/RDPUser information, needed while using STA>`

The rdpServer Profile must be configured on the VPN virtual server.

add vpn vserver v1 SSL <publicIP> <portforterminatingvpnconnections> -rdpServerProfile <rdpServer Profile>`  

Sample Configuration

Sample configuration

  • Enable the required features and modes

    
     enable ns feature ssl
    
     enable ns feature sslvpn
    
     enable ns feature rdpproxy
    
     enable mode usnip
    
    
  • Add VPN URL for the user with target information

     add aaa user Administrator –password freebsd123$%^
    
     add vpn url rdp RdpLink rdp://rdpserverinfo
    
     add dns addrec rdpserverinfo 10.102.147.132
    
     bind aaa user Administrator  –urlName rdp
    
  • Configure RDP client and server profile for the VPN connection

     add rdp clientprofile p1 –psk citrix -redirectClipboard ENABLE
    
     add rdp serverprofile p1 -rdpIP 10.102.147.134 -psk citrix
    
     add vpn vserver mygateway SSL  10.102.147.134 443 –rdpserverprofile p1
    
     set vpn parameter -clientlessVpnMode ON -defaultAuthorizationAction ALLOW -rdpClientProfileName p1
    
     add ssl certKey gatewaykey -cert rdp_rootcert.pem  -key rdp_rootkey
    
     bind ssl vserver mygateway -certkeyName gatewaykey
    
  • ADD SNIP for connection from Citrix ADC to target

     add ns ip 10.102.147.135  255.255.255.0 –type SNIP
    

Option to Disable SSO

The SSO (Single sign On) feature with RDP proxy can be disabled by configuring Citrix ADC traffic policies so the user is always prompted for credentials. When SSO is disabled, RDP enforcement (SmartAccess) doesn’t work.

Example Configuration:

add vpn trafficaction <TrafficActionName> HTTP -SSO OFF

Traffic policy can be configured as per the requirement, the following are two examples:

• To disable SSO for all the traffic:

add vpn trafficpolicy <TrafficPolicyName>  "url contains rdpproxy" <TrafficActionName>

• To disable SSO based on Source/Destination IP/FQDN

add vpn trafficPolicy <TrafficPolicyName>  "HTTP.REQ.URL.CONTAINS(\"rdpproxy\") && CLIENT.IP.SRC.EQ(<IP>)" <TrafficActionName>
bind vpnvserver rdp -policy <TrafficPolicyName> -priority 10

Support for Single Listener

  • Single Listener for Both RDP and SSL Traffic.

  • The RDP file download and RDP traffic can be handled through the same 2 tuple (that is, IP and Port) on the Citrix ADC appliance.

Bookmark

RDP link generation through Portal. Instead of configuring the RDP links for the user or publishing the RDP links through an external portal, you can give users an option to generate their own URLs by providing targerIP:Port. For stateless RDP-proxy deployment, the administrator can include RDP listener information in FQDN: Port format as part of the RDP Client Profile. This is done under the rdpListener option. This configuration is used for the RDP link generation through the portal in Dual Gateway mode.

Bookmark

RDP Proxy Configuration

Do the following to configure RDP Proxy:

  1. Expand Citrix Gateway, expand Policies, right-click RDP, and click Enable Feature.

    Enable feature

  2. Click RDP on the left. On the right, switch to the Client Profiles tab and click Add.

    Create client profile

  3. Give the Client Profile a name and configure it as desired.

    Add name for profile

  4. In the RDP Host field, enter the FQDN that resolves to the RDP Proxy listener, which is typically the same FQDN as the Citrix Gateway appliance’s FDQN.

  5. Near the bottom is a Pre Shared Key. Enter a password and click OK.

    Preshared key password

  6. Give the Server Profile a name.

  7. Enter the IP address of the Gateway Virtual Server you’re going to bind this profile.

  8. Enter the same Pre Shared Key you configured for the RDP Client Profile. Click Create.

    Reenter Preshared key password

  9. If you want to put RDP bookmarks on the Clientless Access portal page, on the left, expand Citrix Gateway, expand Resources, and click Bookmarks.

    Add bookmark

  10. On the right, click Add.

    Add bookmark2

  11. Give the Bookmark a name.

  12. For the URL, enter rdp://MyRDPServer using IP or DNS.

  13. Check the box next to Use Citrix Gateway As a Reverse Proxy and click Create.

  14. Create more bookmarks as desired.

    Add multiple bookmarks

  15. Create or edit a session profile or policy.

  16. On the Security tab, set Default Authorization Action to ALLOW. Or you can use Authorization policies to control access.

    Set default authentication action

  17. On the Remote Desktop tab, select the RDP Client Profile you created earlier.

    Select RDP client profile

  18. If you want to use Bookmarks, on the Client Experience tab, set Clientless Access to On.

    Set clientless access to On

  19. On the Published Applications tab, make sure ICA Proxy is OFF.

    Set ICA Proxy to OFF

  20. Modify or Create your Gateway Virtual Server.

  21. In the Basic Settings section, click More.

    Set basic settings

  22. Use the RDP Server Profile list to select the RDP Server Profile you created earlier.

    Use RDP server profile

  23. Scroll down. Make sure ICA Only is not checked.

    Set ICA only to off

  24. Bind a certificate.

  25. Bind authentication policies.

  26. Bind the session policy/profile that has the RDP Client Profile configured.

    Bind session policy

  27. You can bind Bookmarks to either the Citrix Gateway virtual server or to a Citrix ADC AAA group. To bind to the Citrix Gateway virtual server, on the right, in the Advanced Settings section, click Published Applications.

    Click published applications

  28. On the left, in the Published Applications section, click No Url.

    Set No URL

  29. Bind your Bookmarks.

    Bind bookmarks

  30. Because ICA Only is not specified for this Citrix Gateway virtual server, make sure your Citrix Gateway Universal licenses are configured correctly. On the left, expand Citrix Gateway and click Global Settings.

    Set Global settings

  31. On the right, click Change authentication AAA settings.

    Change Citrix ADC AAA settings

  32. Change the Maximum Number of Users to your licensed limit.

    Set max number of users

  33. If you want to connect to RDP servers by using DNS, make sure DNS servers are configured on the appliance (Traffic Management > DNS > Name Servers).

    Configure DNS servers

  34. If you want to use the short names instead of FQDNs, add a DNS Suffix (Traffic Management > DNS > DNS Suffix).

    Use FQDNs

  35. Connect to your Gateway and log on.

    Connect to gateway

  36. If you configured Bookmarks, click the Bookmark.

    Click bookmarks

  37. You can change the address bar to /rdpproxy/MyRDPServer. You can enter an IP address (for example rdpproxy/192.168.1.50) or DNS name (/rdpproxy/myserver).

    Change address bar

  38. Open the downloaded .rdp file.

    Download RDP file

  39. You can view the currently connected users by going to Citrix Gateway Policies > RDP. On the right is the Connections tab.

    Click connections tab