Remote Desktop Won't Connect Even Though the Firewall Rule Is Right

November 2026

The symptom

You try Remote Desktop to a Windows server, and it fails with "can't connect". From the connecting PC:

Test-NetConnection 192.168.1.10 -Port 3389

shows TcpTestSucceeded : False. You check the firewall, and there is a rule that allows port 3389 from your address. Everything looks right, but it still fails.

A firewall rule only allows traffic. If nothing is listening on port 3389, there is nothing to allow it to.

Step 1: Check on the server itself, not over the network

Run these in PowerShell as Administrator, at the server (or through any remote tool other than RDP):

# Is Remote Desktop switched on? 0 = allowed, 1 = off
Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" fDenyTSConnections

# Is the service running?
Get-Service TermService

# Is anything listening on 3389?
Get-NetTCPConnection -LocalPort 3389 -State Listen -ErrorAction SilentlyContinue

How to read it:

Result Meaning
fDenyTSConnections is 1 Remote Desktop is off. Turn it on in Settings, or set the value to 0
TermService is Stopped Start it: Start-Service TermService
TermService is Running but nothing listens on 3389 The service is stuck. Go to Step 3
Something listens on 3389, but the test still fails It is the firewall or the network between you and the server. Go to Step 4

Step 2: Check the port number is 3389

Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" PortNumber

If it shows another number, the server listens there, and your test must use that port. 3389 is the default.

Step 3: A stuck service: restart, then reboot

Restart-Service TermService -Force

If this fails ("stop failed" or it hangs), the service is stuck and a clean restart of the server is the fix. After the reboot, run the listening check again. The port appears and RDP works. This is what resolved a case where the service said Running but no listener existed.

Step 4: The firewall

Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Select DisplayName, Enabled, Direction, Action

Make sure an inbound rule for TCP 3389 is enabled and allows the address you connect from. If you connect over a VPN, the rule must allow the VPN's address range, not only your LAN.

Other quick checks

  • Windows Home edition cannot host Remote Desktop. Only Pro, Enterprise and Server can.
  • Two sessions at once. Server 2022 allows two administrator sessions without extra licences. A third person is refused.
  • Antivirus firewall. Quick Heal, Seqrite and similar tools can block 3389 even when the Windows firewall allows it.
  • Don't open the port to the whole internet to fix it. See why you should never open port 3389.

Related guides


← All troubleshooting guides