SSH tunnel returns a blank page

I’m new to CloudFlare, trying to get an SSH tunnel to work. Here is my setup:

Rasberry Pi on my home network is hosting a website on port 8080 and rpi is configured to route port 80 traffic to 8080. When I hit my rpi on port 80 from my local machine, the web site serves up just fine.

My rpi is running tunneling as a service with this config file:

    tunnel: 22033c31-092f-47a7-ab5b-3156ad3a5a5a
    credentials-file: /home/pi/.cloudflared/22033c31-092f-47a7-ab5b-3156ad3a5a5a.json

      - hostname:
        service: ssh://localhost:22
      - service: http_status:404

When I hit on port 80, I just get a blank page. I must be missing something - maybe a command to route web traffic?

What are you expecting to see? Your Ingress rule routes that hostname to SSH, not a website. If you want to use that hostname for the SSH web interface, you need to enable the Access setting for that:

1 Like

I’m expecting to see whatever my rpi is dishing out on port 80. I’m not sure where to activate that setting from my cloudflare dashboard. Where do I find it?

Side question: should I expect websockets to work through the ssh tunnel?

Not if Cloudflare DNS for that hostname is a CNAME that points to the Cloudflare Tunnel. That hostname tunnel leads to Port 22 on your Pi.

1 Like

Sweet, I changed the service to point to http://localhost:8080 and it worked!

Looks like the next thing I need to figure out is how to get websockets to work over https. It’s probably something I’m doing wrong in the code.

1 Like

Regarding websockets and domain being proxied via Cloudflare, maybe below topics could help a bit:

My problem was that I needed to change the prefix from ws to wss for the secure version of my page. Amazingly, websockets just work!


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.