Listen to this Post
One of my customers was struggling with frequent RDP disconnects while connecting from a Windows 11 laptop to an old Windows Server 2012. After two days of frustration and failed attempts—including rebooting both the firewall and the server—I finally found a fix!
Turns out, Windows defaults to using UDP for RDP, which can be unstable in some cases. The solution? Force RDP to use TCP instead.
Here’s how you can do it:
- Open Registry Editor (
regedit) on your Windows 11 laptop/PC.
2. Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client
3. Create a new DWORD (32-bit) Value:
- Name: `fClientDisableUDP`
– Value: `1`
4. Restart your laptop or PC.
And that’s it! RDP should now be more stable and reliable.
You Should Know:
Here are some additional commands and tips to troubleshoot and optimize RDP connections:
1. Check Network Stability:
- Use `ping` to check the network latency between your client and the server:
ping <server_ip> -t
- Use `tracert` to trace the route and identify network bottlenecks:
tracert <server_ip>
2. Monitor Server Resources:
- Use `taskmgr` (Task Manager) to check CPU, memory, and disk usage on the server.
- Use PowerShell to monitor resource usage:
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10
3. Firewall Configuration:
- Ensure that TCP port 3389 is open on the server’s firewall:
New-NetFirewallRule -DisplayName "Allow RDP TCP" -Direction Inbound -LocalPort 3389 -Protocol TCP -Action Allow
- Block UDP port 3389 to force TCP usage:
New-NetFirewallRule -DisplayName "Block RDP UDP" -Direction Inbound -LocalPort 3389 -Protocol UDP -Action Block
4. Update RDP Settings:
- Use `gpedit.msc` (Group Policy Editor) to configure RDP settings:
- Navigate to:
Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections
- Enable “Use both UDP and TCP for RDP” and set it to TCP only.
5. Check Event Logs:
- Use Event Viewer to check for RDP-related errors:
Get-WinEvent -LogName "Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational"
What Undercode Say:
Forcing RDP to use TCP instead of UDP can significantly improve connection stability, especially in environments with unreliable networks. However, it’s essential to ensure that your server’s resources are not overutilized and that the network is stable. Additionally, consider upgrading from outdated systems like Windows Server 2012, as they may lack modern security features and optimizations. Always monitor your RDP sessions and use tools like ping, tracert, and Event Viewer to diagnose and resolve issues effectively. If you’re managing multiple servers, automating these checks with PowerShell scripts can save time and improve efficiency.
For further reading on RDP optimization, check out Microsoft’s official documentation.
References:
Reported By: Ahmedalibutt Frequent – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅



