Skip to content

Commit 1b3cd98

Browse files
maxvpthomasgauvin
authored andcommitted
Add vnet limitation (#23548)
1 parent 02a6117 commit 1b3cd98

File tree

2 files changed

+41
-40
lines changed

2 files changed

+41
-40
lines changed

src/content/partials/cloudflare-one/gateway/create-resolver-policy.mdx

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
import { TabItem, Tabs } from "~/components";
66

7+
:::caution[Virtual network limitation]
8+
Resolver policies do not automatically update when you change the virtual networks associated with a route. If you move a route from one virtual network to another, the resolver policy will still reference the old virtual network. You will need to manually remove and recreate the resolver policy to update the route.
9+
:::
10+
11+
To create a resolver policy:
12+
713
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
814

915
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Gateway** > **Resolver policies**.
@@ -17,10 +23,7 @@ import { TabItem, Tabs } from "~/components";
1723
Make sure your destination is not subject to [Local Domain Fallback](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/local-domains/#manage-local-domains).
1824

1925
4. In **Select DNS resolver**, choose _Configure custom DNS resolvers_.
20-
5. Enter the IP addresses of your custom DNS resolver.
21-
:::note[Search virtual networks]
22-
As you enter an IP address, Gateway will search through your [virtual networks](/cloudflare-one/connections/connect-networks/private-net/cloudflared/tunnel-virtual-networks/) configured in Zero Trust.
23-
:::
26+
5. Enter the IP addresses of your custom DNS resolver. As you enter an IP address, Gateway will search through your [virtual networks](/cloudflare-one/connections/connect-networks/private-net/cloudflared/tunnel-virtual-networks/) configured in Zero Trust.
2427
6. In **Network**, choose whether to route queries publicly (to the Internet) or privately (to a private network service).
2528
7. (Optional) Enter a custom port for each IP address.
2629
8. Select **Create policy**.
@@ -31,40 +34,40 @@ Custom resolvers are saved to your account for future use. You can add up to 10
3134
<TabItem label="Terraform (v5)">
3235

3336
1. Add the following permission to your [`cloudflare_api_token`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/api_token):
34-
- `Zero Trust Write`
3537

36-
2. Create a resolver policy using the [`cloudflare_zero_trust_gateway_policy`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_gateway_policy) resource:
38+
- `Zero Trust Write`
3739

38-
```tf
39-
resource "cloudflare_zero_trust_gateway_policy" "resolver_policy" {
40-
name = "Example resolver policy"
41-
enabled = true
42-
account_id = var.cloudflare_account_id
43-
description = "TERRAFORM MANAGED resolver policy"
44-
action = "resolve"
45-
traffic = "dns.fqdn in {\"internal.example.com\"}"
46-
identity = "identity.email in {\"[email protected]\"}"
47-
precedence = 1
48-
rule_settings = {
49-
dns_resolvers = {
50-
# You can add up to 10 IPv4 and 10 IPv6 addresses to a policy.
51-
ipv4 = [{
52-
ip = "192.0.2.24"
53-
port = 53
54-
route_through_private_network = true
55-
vnet_id = cloudflare_zero_trust_tunnel_cloudflared_virtual_network.staging_vnet.id
56-
}]
57-
ipv6 = [{
58-
ip = "2001:DB8::"
59-
port = 53
60-
route_through_private_network = true
61-
vnet_id = cloudflare_zero_trust_tunnel_cloudflared_virtual_network.staging_vnet.id
62-
}]
63-
}
64-
}
65-
}
66-
```
40+
2. Create a resolver policy using the [`cloudflare_zero_trust_gateway_policy`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_gateway_policy) resource:
6741

42+
```tf
43+
resource "cloudflare_zero_trust_gateway_policy" "resolver_policy" {
44+
name = "Example resolver policy"
45+
enabled = true
46+
account_id = var.cloudflare_account_id
47+
description = "TERRAFORM MANAGED resolver policy"
48+
action = "resolve"
49+
traffic = "dns.fqdn in {\"internal.example.com\"}"
50+
identity = "identity.email in {\"[email protected]\"}"
51+
precedence = 1
52+
rule_settings = {
53+
dns_resolvers = {
54+
# You can add up to 10 IPv4 and 10 IPv6 addresses to a policy.
55+
ipv4 = [{
56+
ip = "192.0.2.24"
57+
port = 53
58+
route_through_private_network = true
59+
vnet_id = cloudflare_zero_trust_tunnel_cloudflared_virtual_network.staging_vnet.id
60+
}]
61+
ipv6 = [{
62+
ip = "2001:DB8::"
63+
port = 53
64+
route_through_private_network = true
65+
vnet_id = cloudflare_zero_trust_tunnel_cloudflared_virtual_network.staging_vnet.id
66+
}]
67+
}
68+
}
69+
}
70+
```
6871

6972
</TabItem>
7073
</Tabs>

src/content/partials/learning-paths/zero-trust/private-dns.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
{}
3-
43
---
54

6-
import { Render } from "~/components"
5+
import { Render } from "~/components";
76

87
By default, all DNS requests on the user device are resolved by Cloudflare's [public DNS resolver](/1.1.1.1/) except for common top level domains used for local resolution (such as `localhost`). To allow users to connect to internal server names or domains that do not resolve on the public Internet, you have two options:
98

10-
* [Add internal domains to Local Domain Fallback](#local-domain-fallback)
11-
* [Build custom resolver policies](#resolver-policies)
9+
- [Add internal domains to Local Domain Fallback](#local-domain-fallback)
10+
- [Build custom resolver policies](#resolver-policies)
1211

1312
## Local Domain Fallback
1413

@@ -23,7 +22,6 @@ To learn more about how Local Domain Fallback works, refer to [How the WARP clie
2322
## Resolver policies
2423

2524
:::note
26-
2725
Only available on Enterprise plans.
2826
:::
2927

0 commit comments

Comments
 (0)