☁️
CF WIKI
← 返回产品目录 | 内容快照:2026-06-16
Zero Trust / SASE

Cloudflare Tunnel

让内网服务通过 outbound-only 隧道接入 Cloudflare,无需暴露公网 IP。

官方文档 ↗
免费。
隧道内网
内网应用发布、私有 API、SSH/RDP、家庭实验室
# ~/.cloudflared/config.yml (不是 wrangler)
tunnel: my-tunnel
credentials-file: /etc/cloudflared/cred.json
ingress:
  - hostname: app.example.com
    service: http://localhost:3000
  - service: http_status:404
# 启动隧道(生产用 systemd / docker 跑常驻)
cloudflared tunnel run my-tunnel
  • outbound-only;内网不需要开 inbound 端口
  • 和 Access 搭配才形成完整 Zero Trust 入口;裸 Tunnel 公开有风险
  • 证书文件不要进 git;用 systemd 环境变量或 secret 管理
已复制
🔍 ESC