cloudflare / cloudflared

Cloudflare Tunnel client (formerly Argo Tunnel)
https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide
Apache License 2.0
9.39k stars 837 forks source link

🐛Unable to connect to tunnel on ipv4 only network #1324

Open bobby-b-song opened 2 months ago

bobby-b-song commented 2 months ago

Describe the bug Unable to connect to a cloudflare tunnel using cloudflared in a ipv4 only network.

To Reproduce Steps to reproduce the behavior:

  1. Configure ssh service based on cloudflare tunnel according to https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/ on server machine.
  2. Connect to tunnel from client machine using commend
    cloudflared access ssh --hostname $HOSTNAME --log-level debug --logfile /dev/stdout

    Giving error output

    {"level":"debug","time":"2024-09-04T12:40:34Z","message":"Websocket request: GET / HTTP/1.1\r\nHost: HOSTNAME\r\nUser-Agent: cloudflared/2024.8.2\r\n\r\n"}
    {"level":"error","error":"dial tcp [fd10:aec2:5dae::]:443: connect: network is unreachable","originURL":"https://HOSTNAME","time":"2024-09-04T12:40:36Z","message":"failed to connect to origin"}

Expected behavior The tunnel should connect without a problem

Environment and versions

bobby-b-song commented 2 months ago

Also dns query result:

$HOSTNAME -> $tunnel-id.cfargotunnel.com -> Only AAAA result pointing to ipv6 address