Outbound-Only Encrypted Tunnel: Private Networks, Routing, and Failover
How outbound-only tunnels connect private apps and subnets without open inbound ports, plus routing modes, limits, and verification.
This page summarizes Cloudflare documentation on Cloudflare Tunnel—the connectivity layer where the open-source cloudflared daemon creates encrypted, outbound-only links between your infrastructure and Cloudflare’s network. The same mechanism supports publishing public hostnames with CDN and WAF in front of origins, and Cloudflare One use cases such as VPN replacement, private IP access, and Zero Trust policies.
Cloudflare Tunnel and cloudflared: what connects without a public IP
Section titled “Cloudflare Tunnel and cloudflared: what connects without a public IP”Cloudflare Tunnel is a secure pathway from Cloudflare to your resources when you do not want publicly routable origin addresses or open inbound firewall ports.
Cloudflare Tunnel provides you with a secure way to connect your resources to Cloudflare without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP — instead, a lightweight daemon in your infrastructure (cloudflared) creates outbound-only connections to Cloudflare’s global network.
— Cloudflare, Cloudflare Tunnel (Cloudflare One)
At a high level, a tunnel is a persistent object (identified by a UUID) that acts as the logical link; one tunnel can run multiple cloudflared connectors for capacity and failover.
A tunnel is a persistent object identified by a UUID — it serves as the logical link between your origin and Cloudflare. Within the same tunnel, you can run as many cloudflared processes (connectors) as needed.
— Cloudflare, Cloudflare Tunnel (Cloudflare One)
For public-origin ingress (CDN, WAF, Bot Management), Cloudflare separates docs by use case: Tunnel for public applications versus Cloudflare One Tunnel for private networking and Zero Trust.
Outbound-only connections: how traffic reaches private resources
Section titled “Outbound-only connections: how traffic reaches private resources”Outbound-only means cloudflared initiates connections from inside your network; after the tunnel is up, application traffic can flow both ways over that link without a listener exposed on the Internet.
Cloudflare Tunnel uses an outbound-only connection model to enable bidirectional communication. When you install and run cloudflared, cloudflared initiates an outbound connection through your firewall from the origin to the Cloudflare global network.
— Cloudflare, Cloudflare Tunnel (Cloudflare One)
The connector typically reaches Cloudflare on port 7844 (TCP/UDP) using HTTP/2 or QUIC, as described in Connectivity options.
Positive security model with firewall rules
Section titled “Positive security model with firewall rules”You can block all ingress and allow only cloudflared egress so only configured tunnel services are reachable from outside.
You can implement a positive security model with Cloudflare Tunnel by blocking all ingress traffic and allowing only egress traffic from cloudflared. Only the services specified in your tunnel configuration will be exposed to the outside world.
— Cloudflare, Tunnel with firewall
Tunnel links use TLS 1.3 and post-quantum encryption by default; Configure a tunnel covers tokens, egress-only firewall rules, and running cloudflared with least privilege.
— Cloudflare, Cloudflare Tunnel (Cloudflare One)
Routing: published applications vs private network access
Section titled “Routing: published applications vs private network access”A running tunnel does not by itself expose services; routing defines which traffic uses the tunnel and which local resource receives it.
A connected tunnel does not make a resource reachable on its own. Routing configuration determines which traffic uses the tunnel and which resource that traffic should reach.
— Cloudflare, Tunnel fundamentals
| Mode | Who connects | Typical client | What you configure |
|---|---|---|---|
| Published application (public hostname) | Internet or browser users | Web browser (HTTP/HTTPS) | Map app.example.com → local URL such as http://localhost:8080 |
| Private network (IP/CIDR) | Organization users | Cloudflare One Client (WARP) | Route RFC 1918 or custom CIDR through the tunnel |
| Non-HTTP TCP/UDP (e.g. MySQL, SMB) | Policy-allowed users | Cloudflare One Client + network policies | Private subnet or infrastructure application |
Published applications: public hostname to a local service
Section titled “Published applications: public hostname to a local service”Published applications attach a public DNS hostname to one address, protocol, and port behind cloudflared.
Each public hostname is specific to an address, protocol, and port associated with a private application, allowing for narrow access to a specific service when there might be multiple applications running on the same host.
— Cloudflare, Evolving to a SASE architecture with Cloudflare
Requests hit Cloudflare first (policies, WAF, CDN), then travel down the tunnel. Example mapping from Create a Cloudflare Tunnel: mywebapp.example.com → https://localhost:8080.
You do not need a paid Cloudflare Access plan only to publish via Tunnel; Access seats apply when you enforce login policies (Published applications).
Supported public hostname service types include HTTP, HTTPS, TCP, SSH, RDP, and others; see the table in Routing. Non-HTTP types often require client-side cloudflared (for example cloudflared access tcp); long-lived TCP is better suited to client-to-tunnel private routing than browser-oriented TCP streaming.
Private network routes: reach internal IPs with the Cloudflare One Client
Section titled “Private network routes: reach internal IPs with the Cloudflare One Client”For arbitrary L4 traffic (databases, RDP, ICMP), Cloudflare documents private network access: cloudflared plus the Cloudflare One Client on user devices.
cloudflared, combined with Cloudflare device agent, provides access to private networks, allowing for any arbitrary L4 TCP, UDP or ICMP connections
— Cloudflare, Evolving to a SASE architecture with Cloudflare
User traffic onramps to Cloudflare, passes down the tunnel, and terminates in your LAN; the origin often sees the local source IP of the host running cloudflared, not the end user (Connect with Cloudflare Tunnel).
To connect as a user to an infrastructure application, log into the Cloudflare One Client and connect to the target IP with normal client software (Add an infrastructure application). MySQL over TCP 3306 with network policies is walkthrough material in Access and secure a MySQL database using Cloudflare Tunnel and network policies.
What cloudflared is not: no on-ramp for server-initiated traffic
Section titled “What cloudflared is not: no on-ramp for server-initiated traffic”cloudflared proxies inbound (client-to-server) requests to your network; it is not a full gateway for outbound connections that originate behind the tunnel.
cloudflared only proxies inbound traffic to a private application or network. It does not become a gateway or “on-ramp” back to Cloudflare for the network that it proxies inbound connections to.
— Cloudflare, Evolving to a SASE architecture with Cloudflare
Official traffic-direction summary:
| Connectivity option | Client-initiated | Server-initiated |
|---|---|---|
| Cloudflare Tunnel | Yes | No |
| Cloudflare One Client | Yes | Yes |
| Cloudflare Mesh | Yes | Yes |
| GRE and IPsec tunnels | Yes | Yes |
— Cloudflare, Connectivity options
If your application requires server-initiated connections (for example, VoIP callbacks, database replication), use a bidirectional connectivity option such as Cloudflare One Client, Cloudflare Mesh, Cloudflare WAN (IPsec/GRE), or CNI.
— Cloudflare, Connectivity options
Cloudflare Mesh is documented for preserving long-lived TCP (replication, ERP) and device-to-device private IP connectivity when Tunnel’s off-ramp-only model is insufficient.
When to choose Tunnel: connection methods and use cases
Section titled “When to choose Tunnel: connection methods and use cases”Choose a connection method lists reasons to pick Tunnel:
- Publishing specific applications by hostname
- Outbound-only connectivity (no inbound ports)
- Proxying HTTP/S, TCP, or SSH to specific services
- Running on macOS or Windows, not only Linux
Common deployments include VPN replacement (Connect your private network), internal APIs without public exposure (Connect your internal network services), Kubernetes with cloudflared as an adjacent deployment (Kubernetes), and Zero Trust in front of private web apps via Cloudflare Access.
gRPC is supported via private subnet routing, not public hostname routes (Tunnels FAQ).
Quick Tunnels vs named tunnels: development vs production
Section titled “Quick Tunnels vs named tunnels: development vs production”Quick Tunnels expose a local HTTP service on a temporary trycloudflare.com URL without a Cloudflare account.
Quick Tunnels are for testing and development. For production, create a Cloudflare Tunnel.
— Cloudflare, Quick Tunnels
cloudflared tunnel --url http://localhost:8080Anyone with the printed URL can reach the service until cloudflared stops (Quick Tunnels). For dev sharing, Share a local dev server warns that unprotected tunnels increase exposure—prefer named tunnels with Cloudflare Access when you need stable hostnames or stricter control.
Named tunnels persist in your account, bind to your zone, and support production SLAs (Tunnel fundamentals). Create them via the dashboard or API.
Tunnel availability: connectors, replicas, and limits
Section titled “Tunnel availability: connectors, replicas, and limits”Each cloudflared instance opens four long-lived connections across at least two data centers for redundancy.
When you run a tunnel, cloudflared establishes four outbound-only connections between the origin server and the Cloudflare network. These four connections are made to four different servers spread across at least two distinct data centers.
— Cloudflare, Tunnel availability and failover
Additional cloudflared replicas on separate hosts provide failover; they do not load-balance traffic (Load Balancing Reference Architecture). In Kubernetes, autoscaling cloudflared down can break active sessions (Kubernetes).
Inspect a tunnel from the CLI:
cloudflared tunnel info <UUID or NAME>— Cloudflare, Create a locally-managed tunnel
Client IP, origin visibility, and common mistakes
Section titled “Client IP, origin visibility, and common mistakes”Important to know from Connectivity options:
- The origin often sees the
cloudflaredhost IP, not the original client. - For HTTP, use the
CF-Connecting-IPheader for the client address. - For non-HTTP (SSH, RDP, TCP), the original source IP is generally not available at the origin.
Common mistakes:
- Using Tunnel for database replication, SIP/VoIP callbacks, or other server-initiated flows—use Mesh, IPsec/GRE, or CNI instead.
- Treating multiple
cloudflaredreplicas as a load balancer rather than HA-only. - Leaving origin ports 80/443 open to the Internet while Tunnel is running—verify lockdown (Tunnels FAQ).
- Sharing Quick Tunnel URLs for sensitive apps without Access or policy review.
- Expecting gRPC on a public hostname route—use private subnet routing.
- Assuming
cloudflaredwill carry server egress to the Internet; apps use the host default route instead (Evolving to a SASE architecture with Cloudflare).
How to check this on your site
Section titled “How to check this on your site”-
Confirm the tunnel connector is healthy: run
cloudflared tunnel info <UUID or NAME>and review Tunnel availability and failover. -
For a published web app, test the public hostname and confirm Cloudflare security features apply per Published applications.
-
Verify the origin is not accepting direct Internet connections on exposed ports, e.g.
netcat -zv [your-server's-ip-address] 80and443as in Tunnels FAQ. -
For private network access, connect with the Cloudflare One Client enrolled in your organization and reach a routed IP or hostname per Connect with cloudflared.
-
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about, and we will correct or clarify it.