In some cases, Windows Server administrators recommend that users disable UDP support for RDP connections and use only the TCP protocol, which is more reliable and stable under adverse network conditions. This can help avoid some complications and provide more stable remote server management.
Methods to disable UDP for RDP connection.
You can use several methods to prevent RDP connections over UDP on Windows Server. In this article, we will look at three main methods:
Method 1: Setting up a firewall for Windows Server 2012-2016.
1. Open your server’s “Control Panel” (Win+X → Control Panel).
2. Go to the “System and Security” section. Select Windows Firewall.
3. In the left panel, click on “Advanced settings”.
4. In the Windows Firewall with Advanced Security window, select Inbound Rules. Find the rule “Remote Desktop – User Mode (UDP-In)” with port 3389 (default RDP port, if not changed) and double-click on it.
5. In the “General” section, in the “Action” section, check the box next to “Block the connection” and click “OK”. to save changes.
Launching the firewall for Windows Server 2022-2019 for configuration is done through Server Manager:
The method is through the registry editor (regedit).
The other is a longer and more difficult path. Open the Registry Editor by running the “regedit” command in a Command Prompt or PowerShell as an administrator. Navigate to the following path:
HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client\
Create a new DWORD entry (32-bit value) and name it “fClientDisableUDP”. Set “fClientDisableUDP” to 1 to disable UDP support for RDP connections.
Method through local group policies (gpedit.msc)
1. Open the “Local Group Policy Editor” by running the “gpedit.msc” command in the command line in PowerShell (or Win+X → Run) as an administrator.
2. Go to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Client connection to a remote desktop” (Remote Desktop Connection Client).
3. Find the Turn-Off UDP On Client option and set it to enable.
4. Go to “Computer Configuration” -> “Administrative Templates” -> “Windows Components” -> “Remote Desktop Services” -> “Remote Desktop Session Host” -> “Connections” ( Connections).
5. Find the Select RDP Transport Protocols option and set it to Enabled, and in the options, select Use only TCP.
Results.
These methods will allow you to successfully disable UDP support for RDP connections, which can improve the stability and security of remote sessions on your Windows Server. Don’t forget to restart the server after applying the changes for them to work correctly.