Why does my tunnel don't work, when I don't inclued a port?

Hi, I’m having a bit of trouble understanding the functionality of the tunnels. I have a nodejs server running on port 3000, on IP address: The nodejs Server is without encryption/https.

I want to reach the nodejs server with the subdomain nodejs and my domain miracuru.ch. I set up therefore a tunnel for this. But I want to remain flexible with the ports. I have therefore not specified port 3000 in the tunnel The definition of the tunnel is shown in my screenshot below. So I thought, I can reach now my nodejs server with this URL: http://nodejs.miracuru.ch:3000 but I just getting a connection timeout.

However, if I specify the the port 3000 in my tunnel, then my nodejs server can be reached under the URL https://nodejs.miracuru.ch. Unfortunately, can’t post a second image yet, as I’m to new in this forum.

I don’t understand, why the second method works but not the first one.
And maybe there is a solution, to be able to omit the port, so that I can run multiple servers on different ports on this IP address without specifying a separate tunnel for each port?

Best regards

Hi @miracuru

Unfortunately, you need to add the port in the dashboard as it lets Cloudflared know which port your traffic should be coming from. Since your traffic is all going through the Cloudflare edge, when the traffic is passed through the edge, it is reverse proxied to standard ports such as 443, which is why you cannot use https://nodejs.miracuru.ch:3000


1 Like

Thanks for the explanation @bujangnim . And have a good day.

1 Like

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