Can’t get the cloudflare tunnel to work with truenas

I’ve tried to get the cloudflare tunnel to work, but only getting 502 Bad gateway error (host not reached)

I’m trying to get cloudflare tunnel to work with Truenas and no luck here. Tunnel is showing to be healthy. Everything should be set correctly on cloudflare. Cloudflare logs gives me this error:

“error”: “Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 192.168.1.101:8080: connect: connection refused”

I have a unifi dream router. Can it block the connection? How I can test this?

On truenas cloudflare logs I’m getting following error:

“error=“Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 192.168.1.101:8080: connect: connection refused” connIndex=2 event=1 ingressRule=0 originService=https://192.168.1.101:8080

I don’t have experience with this app, but for other networking issues I usually check to see if the Internet is accessible within the app. I would try pinging Google and then cloudflare. That should help narrow down the list of potential problems

What is this host? What is running on this port? Does it respond in the lan? Is it configured with the correct protocol in the tunnel properties?

I have tried to connect with Home Assistant. It has access to the internet (updates are working).

It also respond in LAN.

Tunnel protocol should be configured right. I have tried even multiple tutorials.

Is 192.168.1.0/24 your lan? Where is cloudflared running? Directly on the host? In a container/jail? If so, can you access your home assistant from that container/jail?