|
| 1 | +--- |
| 2 | +title: Ports that are used by RDS |
| 3 | +description: Introduces the ports that are required to open on firewalls in order to configure Remote Desktop (RD) Services correctly. |
| 4 | +ms.date: 02/08/2025 |
| 5 | +manager: dcscontentpm |
| 6 | +audience: itpro |
| 7 | +ms.topic: troubleshooting |
| 8 | +ms.reviewer: kaushika |
| 9 | +ms.custom: sap:Remote Desktop Services and Terminal Services\Session connectivity, csstroubleshoot |
| 10 | +--- |
| 11 | +# Ports that are used by RDS |
| 12 | + |
| 13 | +This article introduces the ports that are required to open on firewalls in order to configure Remote Desktop (RD) Services correctly. |
| 14 | + |
| 15 | +The information and taxonomy is broken down by role service and component, and lists all inbound and outbound ports used. |
| 16 | + |
| 17 | +## From Client to RD Resource |
| 18 | + |
| 19 | +- TCP 443 (HTTPS) Required if RDWeb is deployed. |
| 20 | +- TCP and UDP 3389: Standard RDP port. Can be configured on host and client to a different port number. |
| 21 | + |
| 22 | +## Remote Desktop Connection Broker (RDCB) |
| 23 | + |
| 24 | +- TCP 5504: Connection to RD Web Access |
| 25 | +- TCP 3389: Connection to RD Session Host |
| 26 | +- TCP 3389: Connection to non-managed VM pools, managed machines use VMBus to open port. |
| 27 | +- TCP 3389: Client port for clients not using RD Gateway |
| 28 | +- TCP 445 and RPC: Connection to RD Virtualization Host |
| 29 | +- TCP 445 and RPC: Connection to RD Session Host |
| 30 | +- TCP 5985: WMI and PowerShell Remoting for administration. |
| 31 | + |
| 32 | +## Remote Desktop Gateway |
| 33 | + |
| 34 | +### Inbound external internet based traffic from RD Clients to the Gateway |
| 35 | + |
| 36 | +- TCP 443: HTTP (includes RPC over HTTP) over SSL. The port is configurable using RD Gateway Management console. |
| 37 | +- UDP 3391: RDP over UDP. The port is configurable using RD Gateway Management console. |
| 38 | + |
| 39 | + > [!NOTE] |
| 40 | + > Firewalls that have directional UDP analysis, such as TMG, require UDP "Send Receive" configured. |
| 41 | +
|
| 42 | +### Internal traffic between the Gateway and the required User AD, Resource AD, DNS, NPS and so on |
| 43 | + |
| 44 | +- TCP 88: Kerberos for user authentication |
| 45 | +- TCP 135: RPC Endpoint Mapper |
| 46 | +- TCP 135: Port that NTDS RPC services listens on AD |
| 47 | +- TCP and UDP 389: LDAP for user authentication |
| 48 | +- TCP and UDP 53: Internal resource name resolution, DNS |
| 49 | +- TCP and UDP 389: If using LDAP for Certificate Revocation List (CRL) |
| 50 | +- TCP 80: If using HTTP for CRL |
| 51 | +- TCP 21: If using FTP for CRL |
| 52 | +- UDP 1812 and 1813: If NPS Server is being used. |
| 53 | +- TCP 5985: WMI and PowerShell Remoting for administration |
| 54 | + |
| 55 | +### Internal traffic from the Gateway and the Internal Remote Desktop resources |
| 56 | + |
| 57 | +- TCP and UDP 3389: RDP |
| 58 | + |
| 59 | + > [!Note] |
| 60 | + > Firewalls that have directional UDP analysis, such as TMG, require UDP "Send Receive" configured in the UDP protocol |
| 61 | +
|
| 62 | +## Remote Desktop Web Access |
| 63 | + |
| 64 | +If RD Web Access is on a perimeter network, configure the following ports. |
| 65 | + |
| 66 | +- TCP: \<WMI Fixed Port\> |
| 67 | +- TCP 5504: connection to RD Connection Broker for centralized publishing |
| 68 | +- TCP 5985: WMI and PowerShell Remoting for administration |
| 69 | + |
| 70 | +## Remote Desktop Session Host |
| 71 | + |
| 72 | +- RD License Server Port RPC |
| 73 | +- TCP 389 and 636: Active Directory communication |
| 74 | +- TCP 5985: WMI and PowerShell Remoting for administration |
| 75 | + |
| 76 | +## Remote Desktop Virtualization Host |
| 77 | + |
| 78 | +- RD License Server Port RPC |
| 79 | +- TCP 389 and 636: Active Directory communication |
| 80 | +- TCP 5985: WMI and PowerShell Remoting for administration |
| 81 | + |
| 82 | +## Remote Desktop Licensing Server |
| 83 | + |
| 84 | +For more information, see [RDS Licensing (RDSL)](../networking/service-overview-and-network-port-requirements.md#rds-licensing-rdsl). |
| 85 | + |
| 86 | +### TCP |
| 87 | + |
| 88 | +- TCP 135: RPC for License Server communication and RDSH |
| 89 | +- TCP 1024-65535 (randomly allocated): Used for RPC in Windows Server versions that is earlier than Windows Server 2008 (see next line). |
| 90 | +- TCP 49152-65535 (randomly allocated): Used for RPC in Windows Server 2008 and later versions. |
| 91 | +- TCP 445: SMB |
| 92 | +- TCP 443: Communication over the internet to the Microsoft Clearing House. |
| 93 | +- TCP 5985: WMI and PowerShell Remoting for administration |
| 94 | +- TCP 139: NetBIOS session service |
| 95 | + |
| 96 | +For more information, see [How to configure RPC dynamic port allocation to work with firewalls](../networking/configure-rpc-dynamic-port-allocation-with-firewalls.md). |
| 97 | + |
| 98 | +### NetBIOS |
| 99 | + |
| 100 | +- UDP 137: NetBIOS Name resolution |
| 101 | +- UDP 138: NetBIOS Datagram Service |
| 102 | +- UDP and TCP 389: LDAP that is used with per-user CALs against Active Directory |
| 103 | + |
| 104 | +From a proxy standpoint, the registry key `HKLM\Software\Microsoft\TermServLicensing\lrwiz\Params` shows the Microsoft service that the RD LS communicates with. |
0 commit comments