Skip to main content

How can we help you?

CGM Knowledge Base

Using Wireshark to Troubleshoot RDP Hosting Connections

1. Purpose

This article explains how to use Wireshark to diagnose issues with customer RDP connections to our hosted environment. Common issues:

  • Customer cannot connect via RDP
  • RDP disconnects or drops sessions
  • RDP feels slow or laggy
  • Suspected firewall or routing problems for RDP traffic

2. Prerequisites

Before capturing:

  1. Install Wireshark

  2. Permissions

    • Local admin/root privileges on the machine where you capture.
    • Change control approval if capturing on production servers.
  3. Information from customer

    • Customer public IP (or VPN IP): X.X.X.XX.X.X.X
    • RDP server IP in our environment: Y.Y.Y.YY.Y.Y.Y
    • Port used:
      • Default RDP: 33893389
      • If using custom RDP port: note the port (e.g. 33903390).
    • Time window when the issue occurs.
    • Symptoms (cannot connect, disconnects, lag).

3. Where to Capture

For RDP-only:

  • Customer side (preferred for connection and performance issues):

    • Customer workstation making the RDP connection.
  • Hosting side:

    • RDP server (Windows Terminal Server / Remote Desktop Session Host).
    • Jump host/bastion if customers connect there first.
    • Firewall/mirror port if available (for network-level troubleshooting).

Rule of thumb:

  • For “cannot connect” or “disconnects”: capture on both customer PC and RDP server when possible.
  • For “slowness/lag”: customer-side capture is usually enough to see latency and retransmissions.

4. Capturing RDP Traffic in Wireshark

4.1 Starting a capture

  1. Open Wireshark.
  2. Select the network interface that carries internet/VPN traffic (e.g. EthernetWi-Fi, or eth0).
  3. Click Start capturing packets.

4.2 Capture filters (optional but recommended)

Set these before clicking Start, to limit capture to RDP traffic:

  • Default RDP port with no specific IP:
    • $tcp port 3389$
  • Between customer and a specific RDP server:
    • $host X.X.X.X and host Y.Y.Y.Y and tcp port 3389$
  • Custom RDP port:
    • $tcp port <custom_port>$

You can set this in Capture → Options → Capture Filter or in the capture filter box on the main screen.


5. Display Filters for RDP Analysis

After capturing, use display filters to narrow the view:

  • All RDP traffic:
    • $tcp.port == 3389$
  • Between customer and our RDP server:
    • $ip.src == X.X.X.X and ip.dst == Y.Y.Y.Y and tcp.port == 3389$
    • or $ip.addr == X.X.X.X and ip.addr == Y.Y.Y.Y and tcp.port == 3389$
  • TCP-level issues for RDP:
    • Retransmissions and lost segments:
      • $tcp.analysis.retransmission or tcp.analysis.fast_retransmission or tcp.analysis.lost_segment$
    • Resets:
      • $tcp.flags.reset == 1$

Note: Wireshark has an $rdp$ protocol dissector, but most troubleshooting is done at TCP level (session establishment, latency, drops).


6. Scenario 1 – Customer Cannot Connect at All

Symptoms: RDP client says “Remote Desktop can’t connect to the remote computer”, “The remote computer is not responding”, or times out.

6.1 Check that SYN packets leave the client

On the customer machine:

  1. Filter:
    • $ip.dst == Y.Y.Y.Y and tcp.port == 3389$
  2. Attempt to connect via RDP.
  3. Look for TCP handshake:
    • Client sends SYN: $tcp.flags.syn == 1 and tcp.flags.ack == 0$
    • Server should respond with SYN/ACK: $tcp.flags.syn == 1 and tcp.flags.ack == 1$
    • Client completes with ACK.

Interpretation:

  • No SYN from client at all:

    • RDP client misconfigured (wrong IP/port).
    • Local firewall blocking outbound RDP.
    • Routing issue on customer LAN/VPN.
  • SYN sent, no SYN/ACK from server:

    • Likely firewall or routing block between customer and our hosting.
    • RDP service may not be listening on the expected IP/port.

6.2 Check from server side

On the RDP server (or closest host):

  1. Filter:
    • $ip.src == X.X.X.X and ip.dst == Y.Y.Y.Y and tcp.port == 3389$
    • Or simply $tcp.port == 3389$ and look for sessions from customer IP.
  2. Attempt to connect from customer.
  3. See whether server receives the SYN:
    • If server never sees the SYN:
      • Routing/firewall between customer and server is blocking traffic.
    • If server sees SYN but immediately sends RST:
      • Filter: $tcp.flags.reset == 1$.
      • RDP service may be disabled or port not open.
      • Local firewall on server may be configured to reject.

6.3 ICMP errors (blocked / unreachable)

On either side, filter:

  • $icmp$

Look for:

  • $icmp.type == 3$ (Destination Unreachable)
  • Codes:
    • Port unreachable: likely RDP service not listening.
    • Host/network unreachable: routing issue.
    • Admin prohibited: firewall policy blocking RDP.

7. Scenario 2 – RDP Disconnects or Drops Sessions

Symptoms: RDP connects, works for some time and then disconnects with “Remote Desktop disconnected” or “Your session has ended”.

7.1 Look for TCP resets

Filter:

  • $ip.addr == X.X.X.X and ip.addr == Y.Y.Y.Y and tcp.port == 3389$
  • $tcp.flags.reset == 1$

Interpretation:

  • Reset from server to client:

    • Server-side firewall/IPS closing the connection.
    • Idle timeout on VPN/firewall.
    • Server OS terminating session (resource issues or policy).
  • Reset from client to server:

    • Local client firewall/AV closing connection.
    • Client network stack issues (VPN drops, interface reset).

Check packet timing:

  • If the RST appears after a period of inactivity:
    • Likely timeout on a security device or VPN.
  • If RST appears immediately after some error:
    • Look at previous packets for TLS or network errors.

7.2 Check for packet loss and retransmissions

Filter:

  • $ip.addr == X.X.X.X and ip.addr == Y.Y.Y.Y and tcp.port == 3389 and (tcp.analysis.retransmission or tcp.analysis.lost_segment)$

Frequent retransmissions indicate:

  • Packet loss on path (ISP, VPN, Wi-Fi).
  • Congestion causing drops.
  • Problem on customer’s local network (especially Wi-Fi).

When retransmissions are severe, the TCP session can stall and may eventually be reset, causing RDP to drop.


8. Scenario 3 – RDP Slowness or Lag

Symptoms: Keyboard/mouse input has delay, screen updates are slow, session feels laggy.

8.1 Check latency (RTT)

  1. Filter:
    • $ip.addr == X.X.X.X and ip.addr == Y.Y.Y.Y and tcp.port == 3389$
  2. Use:
    • “Statistics → TCP Stream Graphs → Round Trip Time Graph”
  3. Select the RDP TCP stream between customer and server.

Interpretation:

  • Consistently high RTT (e.g. more than 150150–200200 ms):
    • Expected latency if customer is geographically distant or on a slow link.
  • Spikes in RTT (variable latency):
    • Network instability (flapping connection, Wi-Fi interference, VPN issues).

8.2 Check retransmissions and throughput

Filter:

  • $tcp.analysis.retransmission or tcp.analysis.fast_retransmission or tcp.analysis.lost_segment$

High retransmissions plus high RTT produce visible lag in RDP.

Additionally, examine:

  • “Statistics → Conversations → TCP”
    • Look at bytes transferred, packets, and duration.
  • If throughput is very low despite good RTT:
    • Possible bandwidth shaping or QoS restrictions.
    • Check if other traffic is saturating the link.

9. Scenario 4 – Confirming Firewall/Port Issues for RDP

Use Wireshark to prove whether RDP is being blocked:

9.1 Expected sequence for a healthy connection

From client:

  1. SYN (to Y.Y.Y.Y:3389Y.Y.Y.Y:3389).
  2. SYN/ACK from server.
  3. ACK from client.
  4. RDP negotiation packets (Client Hello, etc.).

If you never see SYN/ACK, or see ICMP “admin prohibited”:

  • Customer firewall or ISP blocking outbound RDP.
  • Our perimeter firewall blocking inbound RDP.
  • Wrong NAT/VPN configuration.

9.2 Asymmetric behavior between sides

Compare captures:

  • On client side: SYNs sent, no responses.
  • On server side: no incoming SYN from that customer IP.

Conclusion:

  • Traffic is being dropped somewhere in between (usually firewall or routing).
  • Provide capture evidence for network team:
    • Client pcap: shows SYN leaving.
    • Server pcap: shows no corresponding SYN arriving.

10. Saving and Sharing RDP Captures

  1. Stop capture (red square button).

  2. Save:

    • File → Save As…
    • Format: .pcapng.
    • Naming:
      • CustomerName_RDP_YYYY-MM-DD_Client.pcapng
      • CustomerName_RDP_YYYY-MM-DD_Server.pcapng
  3. Export only RDP-related traffic if needed:

    • Set display filter to:
      • $ip.addr == X.X.X.X and ip.addr == Y.Y.Y.Y and tcp.port == 3389$
    • File → Export Specified Packets.
  4. Attach to ticket with:

    • Customer IP.
    • Server IP.
    • Port (normally 33893389).
    • Time when issue was reproduced.
    • Short description of observed behavior.

11. Quick RDP Troubleshooting Cheat Sheet (Wireshark Filters)

You can preconfigure these in Wireshark:

  • All RDP traffic:
    • $tcp.port == 3389$
  • Between a specific customer and server:
    • $ip.addr == X.X.X.X and ip.addr == Y.Y.Y.Y and tcp.port == 3389$
  • TCP handshake (connection attempts):
    • $tcp.flags.syn == 1 and tcp.port == 3389$
  • TCP resets (disconnects):
    • $ip.addr == X.X.X.X and ip.addr == Y.Y.Y.Y and tcp.port == 3389 and tcp.flags.reset == 1$
  • Retransmissions and loss (slowness/instability):
    • $ip.addr == X.X.X.X and ip.addr == Y.Y.Y.Y and tcp.port == 3389 and (tcp.analysis.retransmission or tcp.analysis.fast_retransmission or tcp.analysis.lost_segment)$
  • ICMP unreachable/admin prohibited:
    • $icmp.type == 3$
  • Was this article helpful?