Is it possible to connect a private service through cloudflare tunnels?
I understand that Cloudflare Tunnels are typically used to expose services from a private network to the public internet, but what if I want to connect one private network to another? I’ve read the documentation, and I think this is possible in some way, but I'm still pretty confused.
I have two instances connected through the same Cloudflare Tunnel. Both instances are running HTTP services, but only instance1 has access to an etcd service that instance2 needs to connect to. I want instance2 to access the etcd service on instance1 using a private hostname, without exposing any IP addresses, and for Cloudflare to handle all the DNS and routing between them privately.
Example:
I have two instances connected through the same Cloudflare Tunnel. Both instances are running HTTP services, but only instance1 has access to an etcd service that instance2 needs to connect to. I want instance2 to access the etcd service on instance1 using a private hostname, without exposing any IP addresses, and for Cloudflare to handle all the DNS and routing between them privately.
Example:
- The etcd service on instance1 (e.g.,
http://localhost:2379) should be accessible from instance2 via a private hostname likeetcd-instance1.internal. - Both instances are connected through the same tunnel, and I want Cloudflare to resolve the private hostname and securely route traffic between these two private networks.
cloudflared itself has support for WARP routing as well.