I understand that you can do arbitrary tcp ports using Cloudflare and Cloudflare Tunnel
The server resource that the clients will be connecting to uses 2 ports though. All the examples use 1 port. I don’t see how you add more than 1 port in the terminal command using this as an example below
cloudflared access tcp --hostname tcp.site.com --url localhost:9210
It would seem to me that cloudflared, like most processes, can only listen on one port at a time.
I believe you can run more than one cloudflared process at a time. It would seem to me that whatever port you specify at your server is what will be set up at the Cloudflare end.
But I may be wrong. I’m sure @adaptive know for sure.
When using arbitrary TCP ports I needed to run a command for each port i wanted in a different terminal window. Example for client machine:
cloudflared access tcp --hostname [hostname1] --url localhost:[port number1]
cloudflared access tcp --hostname [hostname2] --url localhost:[port number2]
That port/process management is really painful indeed, so I develop this tool to help me a bit.
GitHub - mmiranda/cfdtunnel: A wrapper for cloudflared that manages multi clients for you
1 Like