|
2 | 2 | {} |
3 | 3 | --- |
4 | 4 |
|
| 5 | +import { Tabs, TabItem } from '~/components'; |
| 6 | + |
| 7 | +<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard"> |
| 8 | + |
5 | 9 | 1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Settings** > **WARP Client**. |
6 | 10 | 2. Under **Device settings**, locate the [device profile](/cloudflare-one/connections/connect-devices/warp/configure-warp/device-profiles/) you would like to modify and select **Configure**. |
7 | 11 | 3. Scroll down to **Split Tunnels**. |
|
10 | 14 | - **Exclude IPs and domains** — (Default) All traffic will be sent to Cloudflare Gateway except for the IPs and domains you specify. |
11 | 15 | - **Include IPs and Domains** — Only traffic destined to the IPs or domains you specify will be sent to Cloudflare Gateway. All other traffic will bypass Gateway and will no longer be filtered by your network or HTTP policies. In order to use certain features, you will need to manually add [Zero Trust domains](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/split-tunnels/#cloudflare-zero-trust-domains). |
12 | 16 |
|
| 17 | +</TabItem> <TabItem label="Terraform (v5)"> |
| 18 | + |
| 19 | +1. Add the following permission to your [`cloudflare_api_token`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/api_token): |
| 20 | + - `Zero Trust Write` |
| 21 | + |
| 22 | +2. Choose a [`cloudflare_zero_trust_device_default_profile`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_device_default_profile) or [`cloudflare_zero_trust_device_custom_profile`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_device_custom_profile) resource to modify, or [create a new device profile](/cloudflare-one/connections/connect-devices/warp/configure-warp/device-profiles/#create-a-new-profile). |
| 23 | + |
| 24 | +3. In your device profile, configure either the `exclude` or `include` argument. You cannot set both `exclude` and `include` in a given device profile. |
| 25 | + |
| 26 | + a. To manage Split Tunnel routes in **Exclude** mode, use the `exclude` argument: |
| 27 | + |
| 28 | + ```tf |
| 29 | + resource "cloudflare_zero_trust_device_custom_profile" "exclude_example" { |
| 30 | + account_id = var.cloudflare_account_id |
| 31 | + name = "Device profile in Split Tunnels Exclude mode" |
| 32 | + enabled = true |
| 33 | + precedence = 101 |
| 34 | + service_mode_v2 = {mode = "warp"} |
| 35 | + match = "identity.email == \"[email protected]\"" |
| 36 | +
|
| 37 | + exclude = [{ |
| 38 | + address = "10.0.0.0/8" |
| 39 | + description = "Example route to exclude from WARP tunnel" |
| 40 | + }] |
| 41 | + } |
| 42 | + ``` |
| 43 | + |
| 44 | + In this example, all traffic will be sent to Cloudflare Gateway except for traffic destined to `10.0.0.0/8`. To exclude the default IPs and domains recommended by Cloudflare, refer to [Add a route](#add-a-route). |
| 45 | + |
| 46 | + b. To manage Split Tunnel routes in **Include** mode, use the `include` argument: |
| 47 | + |
| 48 | + ```tf |
| 49 | + resource "cloudflare_zero_trust_device_custom_profile" "include_example" { |
| 50 | + account_id = var.cloudflare_account_id |
| 51 | + name = "Device profile in Split Tunnels Include mode" |
| 52 | + enabled = true |
| 53 | + precedence = 101 |
| 54 | + service_mode_v2 = {mode = "warp"} |
| 55 | + match = "identity.email == \"[email protected]\"" |
| 56 | +
|
| 57 | + include = [{ |
| 58 | + address = "10.0.0.0/8" |
| 59 | + description = "Example route to include in WARP tunnel" |
| 60 | + }] |
| 61 | + } |
| 62 | + ``` |
| 63 | + |
| 64 | + In this example, only traffic destined to `10.0.0.0/8` will be sent to Cloudflare Gateway. |
| 65 | + |
| 66 | +</TabItem> |
| 67 | +</Tabs> |
| 68 | + |
13 | 69 | All clients with this device profile will now switch to the new mode and its default route configuration. Next, [add](#add-a-route) or [remove](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/split-tunnels/#remove-a-route) routes from your Split Tunnel configuration. |
0 commit comments