← Back to Blog

Remote Desktop Not Working Over VPN: Causes, Checks and Fixes

Published · by Leo Gashi, RS Computers

Remote Desktop VPN Windows

When Remote Desktop works without the VPN but not with it, the cause is almost always the path, not RDP itself: the office PC's subnet is not routed into the tunnel (split tunneling), its name resolves through the wrong DNS server, the remote PC's firewall only accepts Remote Desktop from its own subnet or profile, or the tunnel's MTU is too large so the session connects and then freezes. The reverse case, RDP to your own server dying as soon as a VPN is switched on, usually means the server now sees the VPN's exit IP, which its firewall does not allow. Each cause has one quick check below, and the WireGuard parts were reproduced in our Debian 13 lab.

If the machine you are trying to reach is a server, a Windows VPS from RS Computers in Amsterdam, Dublin or Prishtina comes with a console in the client area, so a VPN or firewall mistake never locks you out for good.

Key facts, checked on 19 November 2026:

Quick fix, in this order

  1. Connect by IP address instead of name. If the IP works, it is DNS.
  2. With the VPN on, run Test-NetConnection -ComputerName OFFICE_PC_IP -Port 3389. False means routing or a firewall; True means MTU, sign-in or the session.
  3. Run Find-NetRoute -RemoteIPAddress OFFICE_PC_IP. If it picks your Wi-Fi or Ethernet adapter, the office subnet is not in the split tunnel; your VPN admin must add it.
  4. On the office PC, the Remote Desktop firewall rule must accept the VPN address pool, not only the local subnet.
  5. Connects, then freezes or goes black? Lower the tunnel MTU.
  6. Lost RDP to your own server when the VPN came on? Allow the VPN's exit IP in the server's firewall, or exclude the server from the tunnel.

Which case do you have?

If RDP fails with the VPN off too, the VPN is not the problem: use our Remote Desktop can't connect checklist.

Symptom, cause and fix

Symptom with the VPN onLikely causeFix
Port test fails; route goes out the Wi-Fi adapterOffice subnet not in the split tunnelAdmin adds the subnet (AllowedIPs, access routes, split tunnel policy)
IP works, computer name does notName resolved by your home DNSUse the IP or full name; admin pushes the office DNS
Route goes into the VPN, port test still times out; ping may workOffice firewall accepts RDP only from its own subnet or profile, or the VPN policy blocks TCP 3389Add the VPN pool to the rule; admin allows 3389 in the VPN policy
Login screen, then freeze, black screen or disconnectTunnel MTU too big, fragments droppedLower the VPN MTU; test with ping /f /l
Fails at night, works in the dayOffice PC asleep or offPower settings or leave it on
RDP to a VPS fails only with the VPN onServer firewall allows your home IP, not the VPN exit IPAllow the exit IP or exclude the server from the tunnel

Check 1: does the office subnet go into the tunnel?

With split tunneling, only listed networks use the VPN. If the office PC's network is not listed, Windows sends RDP to your home router, which drops a private address like 10.20.0.10. These Microsoft commands show where the traffic goes (route, Find-NetRoute, Test-NetConnection):

# on your own Windows PC, PowerShell as your normal user, VPN connected
route print 10.*
Find-NetRoute -RemoteIPAddress "10.20.0.10"
Test-NetConnection -ComputerName 10.20.0.10 -DiagnoseRouting -InformationLevel Detailed

Use the office PC's address. In the Find-NetRoute output, InterfaceAlias should be the VPN adapter; a Wi-Fi or Ethernet name with DestinationPrefix 0.0.0.0/0 means the default route won. -DiagnoseRouting adds SelectedSourceAddress, which should be your VPN address.

We reproduced this with WireGuard in network namespaces on Debian 13 (wireguard-tools 1.0.20210914, documentation IP ranges). The client had AllowedIPs = 10.8.0.0/24, the VPN's own range, but not the office's 10.20.0.0/24:

# as root on the Linux client
ip route get 10.20.0.10
nc -vz -w 5 10.20.0.10 3389
10.20.0.10 via 198.51.100.1 dev h0 src 198.51.100.2 uid 0
nc: connect to 10.20.0.10 port 3389 (tcp) timed out: Operation now in progress

The route goes out the normal adapter h0. With AllowedIPs = 10.8.0.0/24, 10.20.0.0/24, wg-quick printed ip -4 route add 10.20.0.0/24 dev wg0 and the lookup said 10.20.0.10 dev wg0 src 10.8.0.2, as the wg-quick manual describes. On a company VPN the gateway pushes routes at every connect, so send the admin the Find-NetRoute output and the office subnet.

Check 2: test port 3389 through the tunnel

# on your own Windows PC, PowerShell, VPN connected
Test-NetConnection -ComputerName 10.20.0.10 -Port 3389

The last line should be TcpTestSucceeded : True; the output also names the InterfaceAlias and SourceAddress used. If ping works but this fails, something allows ICMP and blocks TCP 3389. If it says True and RDP still fails, the network is fine: our guide to every Remote Desktop error covers CredSSP, NLA and sign-in.

Check 3: DNS through the VPN

A name like office-pc.corp.example often resolves only on the office DNS server. Microsoft's nslookup reference says the second argument is the server to ask, so compare both:

# Command Prompt or PowerShell on your PC, VPN connected
nslookup office-pc.corp.example
nslookup office-pc.corp.example OFFICE_DNS_IP
Get-DnsClientServerAddress

If only the second lookup answers, Windows is not asking the office DNS for that name. Get-DnsClientServerAddress lists each adapter's DNS servers. Use the IP for now; the real fix is a DNS = line in a WireGuard config, or split DNS on GlobalProtect.

Check 4: the office PC's firewall, profile and scope

Most guides miss this one. Over a VPN the office PC sees your VPN address, often from another range. A Remote Desktop rule limited to LocalSubnet, or enabled only for a profile that is not active, drops you silently. In the lab the office host allowed 3389 only from 10.20.0.0/24. With the route fixed, a capture there showed our SYN arriving from the VPN address, and the test still timed out:

IP 10.8.0.2.34854 > 10.20.0.10.3389: Flags [S], seq 4015585391, win 64860, options [mss 1380,...], length 0
nc: connect to 10.20.0.10 port 3389 (tcp) timed out: Operation now in progress

Allowing the VPN pool, 10.8.0.0/24, gave Connection to 10.20.0.10 3389 port [tcp/ms-wbt-server] succeeded!. On Windows, check the office PC:

# on the office PC, administrator PowerShell
Get-NetConnectionProfile
Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Format-Table DisplayName, Enabled, Profile, Direction, Action
Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Get-NetFirewallAddressFilter

Get-NetConnectionProfile shows NetworkCategory: Public, Private or DomainAuthenticated. A rule applies only while its profile is active (Set-NetFirewallRule). RemoteAddress : LocalSubnet in the address filter, the pipe from Microsoft's Get-NetFirewallAddressFilter example, refuses a VPN user from another range. Fix it with one of these:

# on the office PC, administrator PowerShell
Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private
Set-NetFirewallRule -DisplayGroup "Remote Desktop" -RemoteAddress LocalSubnet, 10.8.0.0/24

Use your adapter name and VPN pool. DomainAuthenticated can't be set by hand (Set-NetConnectionProfile), and on a company PC Group Policy usually owns these rules. Admins on Microsoft Q&A also describe Windows 11 PCs that ignore RDP from a VPN subnet even with the firewall off; there is no Microsoft KB for it, so install current updates before chasing it.

Check 5: MTU, when RDP connects and then freezes

A VPN adds headers. Packets too big for a link on the way are split into fragments, and some networks drop fragments. The small handshake passes; full-screen updates don't, so the session freezes, goes black or drops.

In the lab we gave the path to the VPN server a 1400-byte MTU, as on some mobile and PPPoE lines, and dropped fragments in front of the server. With WireGuard's default tunnel MTU of 1420 the port test said succeeded!, then a 2 MB transfer on the same port hung until timeout killed it (exit code 124). With MTU = 1320 it finished in 0.017 seconds.

On Windows, find the size with ping. Microsoft's ping reference says /f sets Do not Fragment and is "useful for troubleshooting path Maximum Transmission Unit (PMTU) problems"; /l sets the data size (-f -l works too):

# on your PC, VPN connected, through the tunnel to the office PC
ping /f /l 1300 10.20.0.10
ping /f /l 1200 10.20.0.10

Lower the size until replies come back. Our Linux run of the same test, ping -M do -s, through the 1420 tunnel:

PING 10.20.0.10 (10.20.0.10) 1301(1329) bytes of data.
2 packets transmitted, 0 received, 100% packet loss, time 1010ms
PING 10.20.0.10 (10.20.0.10) 1300(1328) bytes of data.
2 packets transmitted, 2 received, 0% packet loss, time 1001ms

Arithmetic said 1312 would pass. It didn't, because WireGuard pads each packet to a multiple of 16 bytes before encryption (WireGuard whitepaper, section 5.4.6), so leave a margin. To test the path itself, ping the VPN server's public IP with the VPN off; ours returned Frag needed and DF set (mtu = 1400). With a full tunnel up, that ping goes through the tunnel and measures only the tunnel.

For WireGuard, set MTU = in the client's [Interface] section to the path MTU minus 80 (WireGuard adds 60 bytes over IPv4, 80 over IPv6). Without it, wg-quick picks the MTU from the route to the endpoint: 1420 on our fresh 1500-byte link, 1320 once the kernel had learned the 1400 path. Commercial VPNs set MTU on the gateway, so send the ping results to your admin. If freezes remain, Microsoft's Turn Off UDP On Client policy makes the Remote Desktop client use TCP only.

RDP to a VPS breaks when the VPN is on

A full tunnel sends all traffic through the VPN. In WireGuard that is AllowedIPs = 0.0.0.0/0, which wg-quick sets up with policy routing. From our lab:

[#] wg set wg0 fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0

Our test VPS allowed RDP only from the client's home IP, as our guide to securing RDP on a Windows VPS recommends. A capture on the VPS showed the SYN now coming from the VPN server, and the test timed out:

IP 203.0.113.2.34298 > 192.0.2.10.3389: Flags [S], ...
nc: connect to 192.0.2.10 port 3389 (tcp) timed out: Operation now in progress

Allowing 203.0.113.2, the VPN exit IP, fixed it. Your options, best first:

  1. Allow the VPN's exit IP in the server firewall. This needs a fixed exit IP, which a Tailscale exit node on your own VPS or your own WireGuard server gives you.
  2. Exclude the server from the tunnel: GlobalProtect exclude routes, your VPN app's split tunnel, or WireGuard AllowedIPs that leave the server out.
  3. Put the server inside your own VPN so 3389 is never open to the internet. With a WireGuard VPN server on your own VPS, the Windows server joins as a peer and RDP runs on its tunnel address.

WireGuard for Windows adds a kill switch when one peer has a /0 allowed IP: "All other packets are blocked". Its documentation says 0.0.0.0/1, 128.0.0.0/1 avoids that firewalling.

Client notes: Ivanti, GlobalProtect, FortiClient, WireGuard

Routes and access rules live on the gateway, so users can only diagnose and report.

Ivanti Connect Secure (formerly Pulse Secure)

Split tunneling is set per user role on a Split Tunneling tab, and access rules on an Access Control tab (Configuring VPN Tunneling). Disabled, the default route goes through the tunnel; enabled, only the subnets in split tunneling resource policies do. Under "tunnel routes have precedence", endpoints "lose access to the unprotected subnets" (split tunnel role options). So "Pulse Secure can't Remote Desktop" usually means the office subnet is missing from the role's split tunnel policy, or the access control policy blocks TCP 3389 to that host. If home and office use the same range, route precedence decides which network you lose (Split Tunneling Overview).

Palo Alto GlobalProtect

Include access routes are pushed to the endpoint, exclude routes go out the physical adapter, and more specific routes win (access route split tunnel). The office subnet must be covered by an include route, and a firewall security policy must allow 3389.

Fortinet FortiClient

With split tunneling on, FortiGate tunnels the portal's routing address or the destinations of its firewall policies; Fortinet warns that "all" as a destination makes it a full tunnel (SSL VPN split tunnel). The policy from ssl.root to the internal interface must include the office PC. On FortiOS 7.6.3 or later, FortiClient connects over IPsec instead, so look in the IPsec settings.

WireGuard

Your config decides everything: AllowedIPs is route list and filter, DNS = sets the resolver, MTU = the packet size. On the server, the peer's AllowedIPs must hold the client's tunnel address, and the office network needs a route back to the VPN pool, or NAT on the VPN server.

Frequently asked questions

Why does Remote Desktop work without the VPN but not with it?

The VPN changes the path. A full tunnel sends RDP out through the VPN, so the target sees a different IP; a split tunnel may leave the office network out. Find-NetRoute -RemoteIPAddress with the target IP shows which way Windows sends it.

Why can't I Remote Desktop with Pulse Secure (Ivanti Connect Secure)?

Usually the office subnet is not in the role's split tunneling policy, the access control policy blocks TCP 3389, or your home network uses the office's address range. The Ivanti administrator sets all three; send them the result of Test-NetConnection -ComputerName OFFICE_PC_IP -Port 3389.

I can ping the office PC over the VPN but RDP fails. Why?

Ping uses ICMP and RDP uses port 3389, so a firewall can allow one and block the other. The office PC's Remote Desktop rule must be enabled for the active profile and accept your VPN range, not only LocalSubnet.

Remote Desktop connects over the VPN and then freezes. What causes that?

Usually the tunnel MTU: small packets pass, large screen updates are fragmented and dropped. Find the largest working size with ping /f /l and lower the VPN MTU. In our lab, 1320 instead of 1420 fixed a stalled transfer on a 1400-byte path.

How do I keep RDP to my VPS working while a VPN is on?

Allow the VPN's fixed exit IP in the server firewall, exclude the server from the tunnel, or put the server inside your own VPN. Avoid opening 3389 to everyone.

Can a sleeping PC cause this?

Yes. Microsoft's first prerequisite is that the remote PC is powered on and connected, and a sleeping PC fails the port test exactly like a routing fault. Windows Home can't host Remote Desktop at all.

Need a hand?

Run your own VPN: a WireGuard VPN server on a VPS in Amsterdam, Dublin or Prishtina gives you a fixed exit IP your servers can trust. A Windows VPS comes with its own IPv4 and IPv6 address and a console in the client area. Need a VPN that reaches a Windows server and an office network, routes and firewall rules included? We do custom offers, custom setups and systems built for you, quoted per job: message us on Telegram or email info@rscomputers-ks.com.

← All articles

Chat on Telegram