If the client computer keeps disconnecting when connected to a remote desktop PC, especially via the VPN, this post will help you resolve the issue.
Fix RDP not working or connecting over VPN
If your client computer keeps disconnecting when connected to a remote desktop PC, the error usually occurs when a firewall, NAT conflict, or VPN issue interrupts the client or connection. Take these steps to resolve the issue:
- Disable UDP on the Client
- Configure MTU size
- Prioritize VPN traffic
Make sure to use an administrator account to get this done.
1] Disable UDP on the Client
To start with, you can try disabling UDP on the client. Firewalls and network address translation (NAT) sometimes conflict with UDP traffic. Hence, disabling UDP for RDP can ensure a successful connection, and nothing will interfere with it.
- Press Windows Key + R to open Run.
- Type gpedit.mcs and press Enter.
- Navigate to the following path:
Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Connection Client
- Over here, double-click on Turn Off UDP on Client.
- Please set it to Enabled > Apply > OK.
- Once done, reboot your PC and check if you are still getting the same issue.
Read: PortExpert: Monitor TCP, UDP Connections on Windows
2] Configure MTU size
You must also ensure that you are using the correct MTU size. MTU, or Maximum Transmission Unit, refers to the largest data packets transmitted on a network without fragmentation. If you use an incorrect MTU size, you will likely have issues connecting to RDP.
The default MTU size on Windows is 1500 bytes, which should work in most cases. However, if you still face the same issue, you can increase the default MTU size and test it several times to see if it solves the problem. Just ensure you do not surpass the maximum MTU size of 9000 bytes.
Read: Remote Desktop keeps disconnecting in Windows
3] Prioritize VPN traffic
Lastly, you can try prioritizing VPN traffic on your router to deal with the Windows remote desktop that keeps disconnecting via VPN issues. This works if your router supports VPN.
Once you have set up a VPN on your router, prioritize VPN traffic. You should be able to do this via the web interface or command line of your router or firewall device. The process will vary from one router to another.
I hope the post was easy to follow.
Read: Enable or Disable Your remote session will be disconnected RDC prompt
Does a VPN stop remote access?
When you use a VPN, your actual IP address is hidden, it makes it much harder for hackers to launch a remote attack on your device or network. Because a VPN hides your IP address, it becomes challenging for hackers to launch a remote attack.
Read: Remote Desktop stuck on Please wait in Windows
Does a VPN affect Remote Desktop?
RDP (Remote Desktop Protocol) is a service hosted on a system that uses port 3389 by default. Whether you can access it through a VPN depends on how it is configured. Connecting to an RDP session is possible even when your VPN (Virtual Private Network) is turned on.