What is RDP Gateway? Setup RD Gateway on Windows Server

What is RDP Gateway?

As a feature in Microsoft Windows Server, the RDP Gateway provides a secure and centralized platform for users to access desktops and applications within your organization’s network remotely.

It encrypts communication and offers granular access control, enhancing security and simplifying management compared to traditional RDP access.

To set up an RDP Gateway, you’ll need to:

  1. Install the RDP Gateway role on a Windows Server.
  2. Configure user and device access permissions.
  3. Configure firewall rules to allow connections on designated ports.

Prerequisites to Setup RD Gateway Server in Windows Server 2022, 2019, or 2016

Provide the options below to let this tutorial work correctly and move on.

  • Existing RDS deployment with:
  1. RDS Connection Broker role.
  2. RDS Licensing role.
  3. RDS Session Host roles.

Complete Steps to Setup RDP Gateway on Windows Server

An RDP Gateway server provides secure remote access to your RDS environment over the internet.

Let’s go through the steps of this guide to review how to Set up a Remote Desktop Services Gateway Server.

Step 1: Deploying the RD Gateway Server Role

  • Open Server Manager on the Windows Server computer hosting the Connection Broker role for your RDS deployment.
  • Click “Manage” followed by “Add Roles and Features.”
  • On the Welcome screen, click “Next.”

Click Add Roles and Features

 

  • Choose “Role-based or feature-based installation” and click “Next.”
  • Select the target server for the RD Gateway role (e.g., “rdsfarm” in the screenshot) and click “Next.”
  • Expand “Remote Desktop Services” in the Roles screen and check the box next to “Remote Desktop Gateway.”

Expand Remote Desktop Services in the Roles screen

  • Click “Add Features” to install the required prerequisites, then click “Next” to the confirmation screen. Finally, click “Install.”
  • After installation finishes, click “Close” in Server Manager.

Install the required prerequisites

  • In the Remote Desktop Services node of Server Manager (on the Connection Broker server), locate the green circle with a plus sign above “RD Gateway” and click it.

(Note: This step might need to be repeated if not automatically expanded).

Click the green circle

  • Choose the server functioning as the RD Gateway. Click “Next” to move it to the selected list.

Choose the server functioning as the RD Gateway

  • Enter the FQDN of your RD Gateway Server. (This configures the subject name for the wizard’s self-signed certificate, not the one used in this guide). Click “Next.”

Choose the server functioning as the RD Gateway

  • Click “Add” to confirm adding the server to the deployment. Wait for the installation to complete and then click “Close.”

Step 2: Configuring the RD Gateway Certificate

  • In Server Manager, on the Connection Broker server, navigate to Deployment Overview under the Connection Broker node.
  • Click Tasks, followed by Edit Deployment Properties.

Click Tasks and Edit Deployment Properties.

  • Expand the Certificates node.

Click on the Certificates node

Consider below note:

For testing, a self-signed certificate can be used here. However, for a production environment, a trusted public or domain-based certificate is recommended to avoid installing it on client machines.

  • Select “Existing certificate” and enter the certificate path (e.g., C:\ on the domain controller). Provide the password used to save the certificate.
  • Check the box labeled “Allow the certificate to be added to the Trusted Root Certification Authorities certificate store on the destination computers”. Click OK to confirm.

 Select an existing certificate.

  • Verify the deployment configuration shows a “Ready to Apply” state and click Apply.

Check the Ready to Apply state

 

  • After a short wait, the screen should display a successful operation message with the certificate marked as “Trusted“.

Check for Trusted certificate

  • Repeat the latest 4 steps for the RD Web Access role to use the same certificate for IIS.
  • Click OK to exit the deployment configuration screen.

Step 3: Configuring Connection and Resource Authorization Policies

Before users can access your RDS environment through the RDP Gateway server, you need to define who can connect (Connection Authorization Policy) and what resources they can access (Resource Authorization Policy).

Authorization Policies are crucial for controlling user access to the RDS environment through the RD Gateway server.

  • Open Server Manager on the RD Gateway server.
  • Navigate to Tools > Remote Desktop Services > Remote Desktop Gateway Manager.

Open Remote Desktop Gateway Manager

  • Right-click the server name (e.g., RDSFARM) and select Properties.

Click Properties

  • Under the Server Farm tab, add the RD Gateway server name (e.g., RDSFARM) and click Apply.

Add the name of the RD gateway server

  • Ignore the expected error message regarding a load balancer. Click OK and Apply again. The status should now show “OK”.

Ignore the error

***

Click OK and Apply again

  • While the RD Gateway server allows managing its own SSL certificate, it’s recommended to leverage the configuration already set up in the Connection Broker for consistency (refer to previous steps on certificate setup in the Connection Broker).

Certificate Tab

  • Close the Properties window for the RD Gateway server (you can click “OK“).
  • In the main RD Gateway Manager window, locate the server name and expand it to reveal its settings.
  • Navigate to the Policies section within the expanded server settings.
  • Right-click on Connection Authorization Policies.
  • From the right-click menu, choose Create New Policy.
  • Select the Wizard option to initiate the policy creation process.

Create New Policy

  • Select Create an RD CAP and an RD RAP (recommended), click “Next“.

Select Create an RD CAP and an RD RAP (recommended)

  • Name your connection access policy (CAP), click “Next“.
  • To specify who can connect (CAP), Add Group, select authorized user group (e.g., Domain Users), click “Next“.

Enter the name of the group

  • Accept default settings (CAP) twice (Device Redirection & Session Timeout), review summary, click “Next” for resource access.
  • Name your resource access policy (RAP), click “Next“.
  • Keep the default user group (RAP), click “Next“.

Create an RD RAP

  • “Within the Network Resource settings, if an Active Directory group containing the computer accounts for this RDS deployment’s Session Host servers exists, identify it. Otherwise, choose the option that allows users to connect to any network resource (computer).
  • Click Next to proceed.”

select Allow users to connect to any network resource

  • Leave the default port (3389) for communication between the RD Gateway and Session Hosts. Click Next.
  • On the summary screen, click Finish followed by Close to complete the configuration.

Confirm Policy Creation

You’re All Done!

When you Setup RDP Gateway on your Windows Server, you will secure remote access by encrypting communication and offering centralized control

What are the Benefits of Using RDP Gateway?

RDP Gateway offers several advantages over traditional RDP access, making it a secure and efficient solution for remote access within your organization:

  • Enhanced Security.
  • Centralized Access Control.
  • Simplified Management.
  • Improved Scalability.
  • Reduced Attack Surface.
  • Additional Features.

What are the basic differences between traditional RDP and RDP Gateway?

Here is all about Traditional RDP vs. RDP Gateway:

FeatureTraditional RDPRDP Gateway
SecurityLess secure, directly exposes RDP port (TCP 3389)More secure, encrypts communication using HTTPS
Access ControlLimited control, individual access rules per machineCentralized control, granular permissions for users and resources
ManagementRequires managing individual connections on each machineSimplifies administration with a single point of control
ScalabilityLess scalable, becomes cumbersome with many usersMore scalable, handles a large number of concurrent connections

Conclusion

The RDS Gateway server, now configured, can be positioned behind the firewall for internet-facing access.

Users connecting to RDS session hosts from remote locations (home/office) over the internet will be routed through this secure gateway for initial access

Leave a Reply

Your email address will not be published. Required fields are marked.