Remote Access & Licensing
Remote Access & Licensingbeginner13 min read·Updated Oct 7, 2026

What Is Remote Desktop Gateway? RD Gateway vs Direct RDP

Remote Desktop Gateway (RD Gateway) brokers encrypted RDP access over HTTPS so users can reach internal Windows resources without publishing each server's RDP port to the internet. Compare RD Gateway with direct RDP.

Genuine, fully-licensed Windows
Spin up a Windows Server: full admin, RDP-ready
Genuine Windows Server 2019, 2022, or 2025 with full administrator access. We handle the Microsoft licensing, billed monthly with nothing to buy upfront.

In short

Remote Desktop Gateway (RD Gateway) is a Windows Server Remote Desktop Services role that gives authorized remote users a secure, encrypted path to internal Windows desktops and RemoteApp resources over the internet. Instead of publishing every target server's RDP endpoint directly, clients connect to the gateway and the gateway brokers access to approved internal resources.

People often search for RDS Gateway, but Microsoft's role name is Remote Desktop Gateway (RD Gateway), part of the Remote Desktop Services platform.

For a single administrator with a predictable source IP, tightly restricted direct RDP can be a reasonable management path. For multiple users, changing locations, RemoteApp, RD Session Host, or a business that wants one controlled remote-access entry point, RD Gateway is the cleaner architecture.

On a Raff Windows environment, the internet-facing RD Gateway path normally uses TCP 443, with UDP 3391 available when the supported UDP transport is enabled. Target hosts do not need to publish TCP 3389 directly to internet clients, but the gateway still needs the required internal RDP connectivity to those targets.

This page covers what RD Gateway is and when to use it instead of direct RDP. If you only want direct-RDP hardening steps, use the Windows Server hardening checklist. If you are deciding between the two administrative sessions and a true multi-user RDS deployment, use Multi-User RDP vs RDS Session Host.

What is Remote Desktop Gateway (RDS Gateway)?

Remote Desktop Gateway is a Windows Server role that sits between internet-connected Remote Desktop clients and internal RDS resources. Microsoft describes the role as enabling secure, encrypted connections to Remote Desktop Services resources over the internet without requiring users to establish a traditional VPN first.

The basic path is:

Text
Remote user | | HTTPS / RD Gateway transport v Remote Desktop Gateway | | internal RDP path v Authorized Windows desktop or RD Session Host

The security benefit is architectural: you can publish the gateway as the remote-access entry point instead of publishing TCP 3389 from every target Windows server to the public internet.

RD Gateway is not the desktop host itself. The gateway authenticates and authorizes the connection, then brokers it to the allowed internal Windows resource.

RD Gateway vs direct RDP: quick comparison

AreaDirect RDPRemote Desktop Gateway
Internet-facing pathClient connects directly to the Windows hostClient connects to the gateway first
Typical external portRDP is commonly exposed on TCP 3389 unless restricted or translatedHTTPS uses TCP 443; supported RD Gateway designs can also use UDP 3391
Public exposureEach directly reachable RDP host needs its own controlled pathGateway becomes the main published RDP access layer
Best fitSmall admin-only access with strict allowlistingMultiple users, RDS resources, changing locations, centralized policy
AuthorizationWindows account and host/firewall controlsRD CAP and RD RAP plus target-host controls
CertificatesRDP certificate/security still mattersPublic gateway should use a trusted certificate matching its FQDN
MFAAdded through the chosen identity/access designCan integrate with NPS and Microsoft Entra MFA designs
ComplexityLowerHigher: gateway role, certificate, policies, DNS, monitoring
ScalingEach direct endpoint must be managedGateway servers can be deployed as a farm/load-balanced design

The important comparison is not "which one makes RDP faster?" It is where you place the trust boundary and how many public RDP entry points you want to manage.

How RD Gateway works

A typical connection has four stages:

  1. The Remote Desktop client is configured with the RD Gateway hostname.
  2. The client establishes the gateway connection over the published RD Gateway transport.
  3. RD Gateway evaluates whether the user is allowed to connect and which internal resources that user may reach.
  4. The gateway brokers the RDP session to the authorized target server over the internal network path.

Microsoft's current RDS role guidance identifies HTTPS on TCP 443 as the primary external RD Gateway path and also documents UDP 3391 for the UDP transport. The target Windows server still needs to be reachable from the gateway over the required internal RDP path. The difference is that the target server's RDP port does not need to be published directly to every internet client.

What are RD CAP and RD RAP?

RD Gateway uses authorization policies to separate who may use the gateway from what they may reach.

Remote Desktop Connection Authorization Policy (RD CAP)

An RD CAP determines which users or groups are allowed to connect through the gateway and can include conditions such as authentication method or group membership.

Think of it as:

Text
Who is allowed through this gateway?

Remote Desktop Resource Authorization Policy (RD RAP)

An RD RAP determines which internal computers or resource groups an authorized user may access through the gateway.

Think of it as:

Text
Which Windows resources may this approved user reach?

Keeping those questions separate is one of RD Gateway's main advantages over a loose collection of direct public RDP rules.

RD Gateway vs direct RDP architecture

Architecture diagram comparing direct RDP access with RD Gateway access for a Windows VPS

Direct RDP

A direct design looks like this:

Text
Internet | v Windows Server RDP endpoint

For one administrator, this can be simple. But if the server accepts RDP from the entire internet, its authentication endpoint is continuously exposed to scanning and credential attacks.

A safer direct-RDP design narrows the exposure with controls such as source-IP allowlisting, Network Level Authentication, named administrator accounts, strong unique credentials, account lockout and monitoring, current Windows security updates, and firewall rules that expose only the required path.

For the detailed direct-RDP hardening workflow, see the Windows Server hardening checklist.

RD Gateway

A gateway design looks more like this:

Text
Internet | v RD Gateway | +--> Windows Server A +--> RD Session Host B +--> Approved RDS resource C

Only the gateway needs to be the controlled public RDS entry point. Target hosts can remain behind internal firewall rules that allow RDP from the gateway or other approved management paths.

That centralization becomes more valuable as the number of users, servers, offices, and support staff grows.

What ports does Remote Desktop Gateway use?

Plan the RD Gateway network path in two parts: internet-facing gateway transport and gateway-to-target RDP connectivity.

TrafficTypical portPurpose
HTTPSTCP 443Primary encrypted RD Gateway transport
RD Gateway UDP transportUDP 3391Optional supported UDP path
Internal RDPTCP/UDP 3389 as required by the target designGateway-to-target RDP connectivity inside the protected network

Do not interpret RD Gateway as "RDP no longer uses 3389 anywhere." The goal is to avoid publishing every target host's RDP endpoint directly to the public internet. Internal connectivity between the gateway and target resources still has to be allowed by your network design.

Firewall requirements can vary with Windows Server version, RDS topology, NAT, and whether UDP transport is enabled. Validate the actual Microsoft requirements for the deployment rather than copying a generic port rule into production.

Does RD Gateway replace a VPN?

Not universally. RD Gateway can let users reach approved Remote Desktop resources without first connecting to a traditional VPN, which is useful when the only remote requirement is RDP or RemoteApp access.

A VPN is broader: it can provide network-level access to many protocols and internal services. RD Gateway is narrower and RDP-focused.

RequirementBetter fit
Reach only approved Windows desktops or RemoteAppsRD Gateway can be a good fit
Reach file shares, internal web apps, SSH, databases, and many private subnetsVPN or another private-access architecture may fit better
Give contractors access only to specific RDS resourcesRD Gateway can provide a smaller access scope
Provide full private-network connectivityVPN/private networking is the broader tool

The right choice depends on the resources users actually need, not on whether one technology is "more secure" in every scenario.

RD Gateway is different from RD Session Host

RD Gateway controls the remote path into the RDS environment. RD Session Host runs the multi-user Windows desktops and RemoteApp sessions.

Text
RD Gateway = secure access path RD Session Host = where user sessions/apps run

You can use RD Gateway to access a regular Windows server or as part of a larger RDS deployment. Adding RD Gateway does not itself turn a Windows Server into a properly licensed multi-user desktop host.

If employees need daily shared desktops or RemoteApp sessions, review RDS CAL Licensing and Multi-User RDP vs RDS Session Host.

For Raff-hosted RDS under SPLA, plan RDS User SALs separately from the Windows Server instance licence.

When direct RDP is reasonable

Direct RDP can still be appropriate when the environment is genuinely small and administrative: one or two administrators, stable source networks, no daily shared-desktop users, active login monitoring, and a tested recovery path.

The key distinction is restricted direct RDP versus broadly exposed direct RDP. A single server accepting TCP 3389 only from a known corporate IP is a very different risk profile from a server accepting RDP connections from every internet address.

When RD Gateway is the better fit

RD Gateway usually becomes more attractive when several employees use remote Windows resources, users connect from changing networks, you operate multiple Windows servers, you use RD Session Host or RemoteApp, an MSP needs a repeatable access pattern, or you need clearer user/resource policy through CAP and RAP.

RD Gateway adds infrastructure, so it should solve a real access-management problem. For one administrator and one server, a properly restricted management path can be simpler.

Does RD Gateway support MFA?

RD Gateway can participate in an MFA design, but the RD Gateway role is not itself an MFA provider.

Microsoft documents integrating RD Gateway with Network Policy Server (NPS) and the Microsoft Entra multifactor authentication NPS extension. In that design, the NPS layer participates in the authorization flow and the extension performs the MFA step.

Microsoft's deployment guidance places the NPS extension on a separate NPS server rather than treating the RD Gateway role itself as the MFA engine. For the implementation overview and prerequisites, see Add MFA to Remote Desktop Services on Windows Server 2025.

MFA should be treated as an additional control, not a replacement for certificates, patching, CAP/RAP design, host firewall rules, logging, or least privilege.

Certificate requirements

RD Gateway is a public-facing encrypted service, so certificate planning is part of the deployment rather than an optional polish step.

Use a certificate trusted by the client devices and make sure the certificate name matches the fully qualified domain name users configure for the gateway, for example rdg.example.com.

Before production rollout, verify the certificate is trusted by client devices, the subject/SAN covers the public gateway hostname, the private key is installed on the gateway, renewal is monitored, and the replacement process is tested before expiration.

Basic RD Gateway deployment flow

For the Windows Server 2025 role-installation workflow and CAP/RAP configuration overview, see Deploy Remote Desktop Gateway on Windows Server 2025.

A production planning sequence is:

  1. Choose the public gateway FQDN and DNS record.
  2. Install the Remote Desktop Gateway role service.
  3. Import a trusted certificate for the public gateway name.
  4. Define RD CAP rules for authorized users/groups.
  5. Define RD RAP rules for allowed internal resources.
  6. Configure firewall rules for the external and internal paths.
  7. Configure Remote Desktop clients to use the gateway.
  8. Add MFA/NPS integration if required.
  9. Test both allowed and deliberately denied access paths.
  10. Add logging, monitoring, backup, and certificate-renewal procedures.

Do not make "the session opens" your only acceptance test. A secure deployment should also prove that unauthorized users and unauthorized target resources are denied.

High availability and scale

RD Gateway can be deployed as a farm for additional availability and capacity. If one gateway failure would lock the whole team out, consider a second gateway instance, load balancing, certificate consistency across nodes, centralized policy configuration, monitoring from outside the environment, and a documented emergency administration path.

A gateway improves architecture, but a single unmonitored gateway can also become a single point of failure.

RD Gateway security checklist

Before production use, confirm:

  • Public target hosts do not expose RDP more broadly than necessary.
  • The gateway has a trusted certificate matching its public FQDN.
  • RD CAP rules allow only intended users/groups.
  • RD RAP rules allow only intended target resources.
  • External TCP 443 is configured as required.
  • UDP 3391 is enabled only if your design uses the supported UDP transport.
  • Internal RDP reachability is restricted to intended paths.
  • MFA is configured when the risk model requires it.
  • Windows Server and RDS components are patched.
  • Gateway and target-host login events are monitored.
  • Certificate expiration is monitored.
  • Recovery and emergency access procedures are documented.
  • RD Session Host users have the required RDS licensing.

Which should you use on a Windows VPS?

For a Windows VPS used only for server administration, direct RDP can be practical when you can restrict it to trusted source addresses and keep the number of administrators small.

For a Windows VPS that is becoming a shared workplace, hosts business applications for remote staff, serves RemoteApp sessions, or gives several users access from unpredictable networks, RD Gateway gives you a more deliberate access boundary.

A useful progression is:

Text
One admin / one server -> restricted management RDP Growing remote team -> RDS architecture review -> RD Gateway for controlled external access -> MFA, policies, monitoring and licensing

Raff Windows VMs provide the Windows Server environment and administrator access needed to build either model. The customer still needs to design the RDS roles, certificates, authorization policies, MFA integration, firewall rules, licensing, and recovery plan for the production workload.

If the environment is intended for remote employees rather than occasional administration, review Remote Desktop Hosting together with Windows Server Licensing before rollout.

What's next

Sources

  • Microsoft Learn — Deploy the Remote Desktop Gateway role
  • Microsoft Learn — Remote Desktop Services roles
  • Microsoft Learn — Remote Desktop Services overview in Windows Server
  • Microsoft Learn — Plan for access from anywhere with Remote Desktop Services
  • Microsoft Learn — Integrate RD Gateway with Microsoft Entra MFA using the NPS extension
  • Microsoft Learn — License Remote Desktop Services with CALs
  • Sources revalidated: 2026-09-17
Was this article helpful?

Frequently asked questions

What is a Remote Desktop Gateway?
RD Gateway is a Windows Server role that brokers encrypted Remote Desktop connections through one controlled HTTPS entry point, instead of exposing each server's RDP port directly to the internet. Users connect to the gateway, and the gateway connects them to the right desktop resource.
Does RD Gateway require a VPN?
No. Microsoft designed RD Gateway to give secure, encrypted access to Remote Desktop resources over the internet without a VPN. Connections run over HTTPS, which also passes through most corporate and guest networks more reliably than raw RDP.
Does RD Gateway remove the need for RDS CALs?
No. RD Gateway is an access role, not a licensing exemption. Users or devices connecting to an RD Session Host still need the applicable RDS CAL, or RDS SALs in a hosted SPLA model like Raff's.

Published July 1, 2026 · Updated October 7, 2026

Back to hub
Ready when you are

Your Windows Server, live in ~55 seconds

Genuine, fully-licensed Windows with full admin and RDP. We handle the Microsoft licensing, billed monthly with nothing upfront. On NVMe SSD, backed by a 14-day money-back guarantee.

Related articles