cloudflare / cloudflared

Cloudflare Tunnel client (formerly Argo Tunnel)

Home Page:https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] Windows RDP connection fail πŸ›

rosx27 opened this issue Β· comments

Describe the bug
I think this is not a bug but there is no option for just a question. Anyway here goes:

I'm trying to use the trycloudflare since i haven't purchased a domain yet.

I have to Windows 10 PCs:
On host side, i run this command:

cloudflared-windows-amd64.exe tunnel --url rdp://localhost:3389

which gives a url:

https://optional-archive-electric-uruguay.trycloudflare.com

On client side, i run this command:

cloudflared-windows-amd64.exe access rdp --hostname optional-archive-electric-uruguay.trycloudflare.com

No output was generated, it just executed then I was able to run another command like nothing happened, however, on host side:

2023-11-07T15:39:32Z INF Registered tunnel connection connIndex=0 connection=4f25cc7c-1637-4f67-98ba-b490adf13db8 event=0 ip=xxx.xxx.xxx.xxx location=sin13 protocol=quic
2023-11-07T15:39:36Z ERR  error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." cfRay=8226ab69409221a6-HKG event=1 originService=rdp://localhost:3389
2023-11-07T15:39:36Z ERR Request failed error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." connIndex=0 dest=https://optional-archive-electric-uruguay.trycloudflare.com/ event=0 ip=xxx.xxx.xxx.xxx type=http
2023-11-07T15:39:37Z ERR  error="dial tcp [::1]:3389: operation was canceled" cfRay=8226ab7954bb21a6-HKG event=1 originService=rdp://localhost:3389
2023-11-07T15:39:37Z ERR Request failed error="dial tcp [::1]:3389: operation was canceled" connIndex=0 dest=https://optional-archive-electric-uruguay.trycloudflare.com/favicon.ico event=0 ip=xxx.xxx.xxx.xxx type=http
2023-11-07T15:39:54Z ERR  error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." cfRay=8226abdd964eb44b-HKG event=1 originService=rdp://localhost:3389
2023-11-07T15:39:54Z ERR Request failed error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." connIndex=0 dest=https://optional-archive-electric-uruguay.trycloudflare.com/ event=0 ip=xxx.xxx.xxx.xxx type=ws
2023-11-07T15:40:16Z ERR  error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." cfRay=8226ac64e40e0791-HKG event=1 originService=rdp://localhost:3389
2023-11-07T15:40:16Z ERR Request failed error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." connIndex=0 dest=https://optional-archive-electric-uruguay.trycloudflare.com/ event=0 ip=xxx.xxx.xxx.xxx type=ws
2023-11-07T15:41:49Z ERR  error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." cfRay=8226aeaa513904b5-HKG event=1 originService=rdp://localhost:3389
2023-11-07T15:41:49Z ERR Request failed error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." connIndex=0 dest=https://optional-archive-electric-uruguay.trycloudflare.com/ event=0 ip=xxx.xxx.xxx.xxx type=ws
2023-11-07T15:42:10Z ERR  error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." cfRay=8226af2b7327106d-HKG event=1 originService=rdp://localhost:3389
2023-11-07T15:42:10Z ERR Request failed error="dial tcp [::1]:3389: connectex: No connection could be made because the target machine actively refused it." connIndex=0 dest=https://optional-archive-electric-uruguay.trycloudflare.com/ event=0 ip=xxx.xxx.xxx.xxx type=ws

if i try and run this command on the client side:

cloudflared-windows-amd64.exe access rdp --hostname optional-archive-electric-uruguay.trycloudflare.com --url localhost:3389

The output is:

2023-11-07T15:56:28Z INF Start Websocket listener host=localhost:3389
2023-11-07T15:56:28Z ERR Error on Websocket listener error="failed to start forwarding server: listen tcp 127.0.0.1:3389: bind: An attempt was made to access a socket in a way forbidden by its access permissions."
failed to start forwarding server: listen tcp 127.0.0.1:3389: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

I know based on the documentation, there should be a hostname for my domain, i'm just trying it out though.

To Reproduce
Steps to reproduce the behavior:
Same command as above.

If it's an issue with Cloudflare Tunnel:
No config needed.

Expected behavior
A clear and concise description of what you expected to happen.

Environment and versions

  • OS: Windows 10
  • Architecture: AMD

Logs and errors
Provided above.

Additional context
Add any other context about the problem here.

This ' No connection could be made because the target machine actively refused it.' sugests that its being blocked by a firewall or the RDP service is not running. Check out: https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-allow-access