You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/remote-tunnel-permissions.mdx
Copy file name to clipboardExpand all lines: src/content/docs/cloudflare-one/connections/connect-networks/private-net/cloudflared/tunnel-virtual-networks.mdx
+81-11Lines changed: 81 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Here are a few scenarios where virtual networks may prove useful:
46
46
The following example demonstrates how to add two overlapping IP routes to Cloudflare (`10.128.0.1/32` staging and `10.128.0.1/32` production).
47
47
48
48
<Tabs>
49
-
<TabItemlabel="Dashboard">
49
+
<TabItemlabel="Dashboard">
50
50
To route overlapping IPs over virtual networks:
51
51
52
52
1. First, create two unique virtual networks:
@@ -67,10 +67,81 @@ The following example demonstrates how to add two overlapping IP routes to Cloud
67
67
68
68
We now have two overlapping IP addresses routed over `staging-vnet` and `production-vnet` respectively. You can use the Cloudflare WARP client to [switch between virtual networks](#connect-to-a-virtual-network).
69
69
70
-
</TabItem>
70
+
</TabItem>
71
71
72
-
<TabItemlabel="cli">
73
-
To route overlapping IPs over virtual networks:
72
+
<TabItemlabel="Terraform (v5)">
73
+
To route overlapping IPs over virtual networks:
74
+
1. Add the following permission to your [`cloudflare_api_token`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/api_token):
4. Route `10.128.0.1/32` through `Staging tunnel` and assign it to `staging-vnet`. Route `10.128.0.1/32` through `Production tunnel` and assign it to `production-vnet`.
5.[Get the token](/cloudflare-one/connections/connect-networks/configure-tunnels/remote-tunnel-permissions/#get-the-tunnel-token) for each tunnel.
139
+
140
+
6. Using the tunnel tokens, run `Staging tunnel` in your staging environment and run `Production tunnel` in your production environment. Refer to [Install and run the tunnel](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel-api/#4-install-and-run-the-tunnel).
141
+
</TabItem>
142
+
143
+
<TabItemlabel="Locally-managed tunnels">
144
+
To route overlapping IPs over virtual networks for [locally-managed tunnels](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/):
74
145
75
146
1. Create a tunnel for each private network:
76
147
@@ -113,10 +184,9 @@ The following example demonstrates how to add two overlapping IP routes to Cloud
113
184
cloudflared tunnel vnet list
114
185
```
115
186
116
-
{/* Commenting out notes within tabs for now
117
187
:::note[Default virtual network]
118
188
All accounts come pre-configured with a virtual network named `default`. You can choose a new default by typing `cloudflared tunnel vnet update --default <virtual-network-name>`.
119
-
:::*/}
189
+
:::
120
190
121
191
4. Configure your tunnels with the IP/CIDR range of your private networks, and assign the tunnels to their respective virtual networks.
122
192
@@ -162,7 +232,7 @@ The following example demonstrates how to add two overlapping IP routes to Cloud
162
232
## Delete a virtual network
163
233
164
234
<Tabs>
165
-
<TabItemlabel="Dashboard">
235
+
<TabItemlabel="Dashboard">
166
236
To delete a virtual network:
167
237
168
238
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels** and ensure that no IP routes are assigned to the virtual network you are trying to delete. If your virtual network is in use, delete the route or reassign it to a different virtual network.
@@ -175,10 +245,10 @@ The following example demonstrates how to add two overlapping IP routes to Cloud
175
245
176
246
You can optionally delete the tunnel associated with your virtual network.
177
247
178
-
</TabItem>
248
+
</TabItem>
179
249
180
-
<TabItemlabel="cli">
181
-
To delete a virtual network:
250
+
<TabItemlabel="Locally-managed tunnels">
251
+
To delete a virtual network for [locally-managed tunnels](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/):
182
252
183
253
1. Delete all IP routes in the virtual network. For example,
184
254
@@ -200,7 +270,7 @@ The following example demonstrates how to add two overlapping IP routes to Cloud
200
270
201
271
You can verify that the virtual network was successfully deleted by typing `cloudflared tunnel vnet list`.
0 commit comments