OpenAICloudflare Developer PlatformMay 21, 2026, 12:00 AM

Workers VPC - Reach Cloudflare WAN destinations from Workers VPC

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

Workers VPC - Reach Cloudflare WAN destinations from Workers VPC

Key Points

  • Use network_id: cf1:network in VPC bindings
  • Single binding reaches Mesh, Tunnel, and WAN on‑ramps
  • Ensure return routes for Cloudflare source IPs

Summary

You can now bind Workers to Cloudflare's VPC network using network_id: "cf1:network". A single VPC Network binding lets your Worker reach private destinations across Cloudflare Mesh nodes, subnet/hostname routes announced via Cloudflare Tunnel or Mesh, and destinations connected through Cloudflare WAN on-ramps (GRE, IPsec, CNI).

Key Points

  • Configure a VPC Network binding in wrangler: e.g. JSONC "vpc_networks": [{ "binding": "PRIVATE_NETWORK", "network_id": "cf1:network", "remote": true }] or TOML [[vpc_networks]] binding = "PRIVATE_NETWORK" network_id = "cf1:network" remote = true.
  • At runtime, route requests via the binding: await env.PRIVATE_NETWORK.fetch("http://10.50.0.100:8080/api").
  • For WAN on-ramps (GRE, IPsec, CNI) ensure your network routes the Cloudflare source IP range back through the on-ramp so reply traffic returns; without this return path, stateful flows will fail.
  • Refer to the VPC Networks documentation for additional configuration options and onboarding guidance.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Workers VPC — Workers VPC から Cloudflare WAN の宛先に到達する

Workers VPC — Workers VPC から Cloudflare WAN の宛先に到達する

公開日: 2026-05-21

Cloudflare の VPC Network バインディングで network_id: "cf1:network" を使用すると、Workers からプライベートネットワーク全体に到達できるようになりました。到達可能な宛先には以下が含まれます:

  • Cloudflare Mesh ノードおよびクライアントデバイス
  • Cloudflare Tunnel または Cloudflare Mesh を通じてアナウンスされたサブネットルートおよびホスト名ルート
  • Cloudflare WAN のオンランプ(GRE、IPsec、CNI)経由で接続された宛先

これにより、単一の VPC Network バインディングで、Cloudflare Tunnel(クラウド VPC から)やプライベートサブネット上の Mesh ノード、データセンターや拠点からの Cloudflare WAN オンランプ経由など、サービスがどのように Cloudflare に接続されているかに関わらず、Worker のリクエストをプライベートサービスにルーティングできます。

wrangler.jsonc

{
 " vpc_networks " : [
   {
     " binding " : "PRIVATE_NETWORK" ,
     " network_id " : "cf1:network" ,
     " remote " : true ,
   },
 ],
}

wrangler.toml

[[ vpc_networks ]]
binding = "PRIVATE_NETWORK"
network_id = "cf1:network"
remote = true

実行時には、fetch() に渡す URL によって宛先が決まります:

JavaScript

// Reach a service behind a Cloudflare WAN IPsec on-ramp
const response = await env . PRIVATE_NETWORK . fetch ( "http://10.50.0.100:8080/api" ) ;

注意

Cloudflare WAN のオンランプ(GRE、IPsec、CNI)の背後にある宛先については、返信トラフィックがオンランプ経由で Cloudflare に戻るように、ネットワークが Cloudflare ソース IP 範囲をオンランプに戻すルートを設定している必要があります。このルートがないと、ステートフルなフローは失敗します。これは標準的な Cloudflare WAN のオンボーディングの一部です。

設定オプションについては、VPC Networks を参照してください。