https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/rdp/#connect-to-rdp-server-with-cloudflared-access

This document is bad for understand.

Important

  1. Server (be control) need connect to cloudflare tunnel.
  2. Client need connect to cloudflare tunnel too.

Server - tunnel - cloudflare - tunnel - Client

Server

Follow cloudflare document “1. Connect the server to Cloudflare”. This is correct.

Client

cloudflare document “2. Connect as a user” have problems

cloudflared access rdp --hostname rdp.example.com --url rdp://localhost:3389

–hostname => –tunnel-host

cloudflared access rdp --tunnel-host rdp.example.com --url rdp://localhost:3389

Then Rdp Client connect localhost:3389

Clinet PC opne port 3389, rdp client use this port –connect to– cloudflare rdp.example.com –pass to– Server rdp://localhost:3389

Result

> cloudflared access rdp --tunnel-host rdp.example.com --url localhost:3389
2024-09-12T04:36:46Z INF Start Websocket listener host=localhost:3389