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
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Gateway** > **Firewall policies**.
10
12
2. In the **DNS** tab, select **Add a policy**.
11
13
3. Name the policy.
@@ -17,4 +19,48 @@ To create a new DNS policy:
17
19
/>
18
20
6. Select **Create policy**.
19
21
22
+
</TabItem>
23
+
24
+
<TabItemlabel="API">
25
+
26
+
1.[Create an API token](/fundamentals/api/get-started/create-token/) with the following permissions:
27
+
28
+
| Type | Item | Permission |
29
+
| ------- | ---------- | ---------- |
30
+
| Account | Zero Trust | Edit |
31
+
32
+
2. (Optional) Configure your API environment variables to include your [account ID](/fundamentals/setup/find-account-and-zone-ids/) and API token.
33
+
3. Send a `POST` request to the [Create a Zero Trust Gateway rule](/api/resources/zero_trust/subresources/gateway/subresources/rules/methods/create/) endpoint. For example, we recommend adding a policy to block all [security categories](/cloudflare-one/policies/gateway/domain-categories/#security-categories):
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Gateway** > **Firewall policies**.
10
12
2. In the **HTTP** tab, select **Add a policy**.
11
13
3. Name the policy.
12
14
4. Under **Traffic**, build a logical expression that defines the traffic you want to allow or block.
13
-
5. Choose an **Action** to take when traffic matches the logical expression. For example, if you have enabled TLS inspection, some applications that use [embedded certificates](/cloudflare-one/policies/gateway/http-policies/tls-decryption/#inspection-limitations) may not support HTTP inspection, such as some Google products. You can create a policy to bypass inspection for these applications:
15
+
5. Choose an **Action** to take when traffic matches the logical expression. For example, if you have configured TLS decryption, some applications that use [embedded certificates](/cloudflare-one/policies/gateway/http-policies/tls-decryption/#inspection-limitations) may not support HTTP inspection, such as some Google products. You can create a policy to bypass inspection for these applications:
1.[Create an API token](/fundamentals/api/get-started/create-token/) with the following permissions:
36
+
37
+
| Type | Item | Permission |
38
+
| ------- | ---------- | ---------- |
39
+
| Account | Zero Trust | Edit |
40
+
41
+
2. (Optional) Configure your API environment variables to include your [account ID](/fundamentals/setup/find-account-and-zone-ids/) and API token.
42
+
3. Send a `POST` request to the [Create a Zero Trust Gateway rule](/api/resources/zero_trust/subresources/gateway/subresources/rules/methods/create/) endpoint. For example, if you have configured TLS decryption, some applications that use [embedded certificates](/cloudflare-one/policies/gateway/http-policies/tls-decryption/#inspection-limitations) may not support HTTP inspection, such as some Google products. You can create a policy to bypass inspection for these applications:
"description": "Bypass TLS decryption for unsupported applications",
51
+
"precedence": 0,
52
+
"enabled": true,
53
+
"action": "off",
54
+
"filters": [
55
+
"http"
56
+
],
57
+
"traffic": "any(app.type.ids[*] in {16})",
58
+
"identity": "",
59
+
"device_posture": ""
60
+
}'
61
+
```
62
+
63
+
```sh output
64
+
{
65
+
"success": true,
66
+
"errors": [],
67
+
"messages": []
68
+
}
69
+
```
70
+
71
+
The API will respond with a summary of the policy and the result of your request.
72
+
73
+
Cloudflare also recommends adding a policy to block [known threats](/cloudflare-one/policies/gateway/domain-categories/#security-categories) such as Command & Control, Botnet and Malware based on Cloudflare's threat intelligence:
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Gateway** > **Firewall policies**.
10
12
2. In the **Network** tab, select **Add a policy**.
11
13
3. Name the policy.
@@ -17,4 +19,48 @@ To create a new network policy:
17
19
/>
18
20
6. Select **Create policy**.
19
21
22
+
</TabItem>
23
+
24
+
<TabItemlabel="API">
25
+
26
+
1.[Create an API token](/fundamentals/api/get-started/create-token/) with the following permissions:
27
+
28
+
| Type | Item | Permission |
29
+
| ------- | ---------- | ---------- |
30
+
| Account | Zero Trust | Edit |
31
+
32
+
2. (Optional) Configure your API environment variables to include your [account ID](/fundamentals/setup/find-account-and-zone-ids/) and API token.
33
+
3. Send a `POST` request to the [Create a Zero Trust Gateway rule](/api/resources/zero_trust/subresources/gateway/subresources/rules/methods/create/) endpoint. For example, you can use a list of [device serial numbers](/cloudflare-one/identity/devices/warp-client-checks/corp-device/) to ensure users can only access an application if they connect with the WARP client from a company device:
Copy file name to clipboardExpand all lines: src/content/partials/cloudflare-one/gateway/policies/enforce-device-posture.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
{}
3
3
---
4
4
5
-
In the following example, you can use a list of [device serial numbers](/cloudflare-one/identity/devices/warp-client-checks/corp-device/) to ensure users can only access an application if they connect with the WARP client from a company device:
5
+
For example, you can use a list of [device serial numbers](/cloudflare-one/identity/devices/warp-client-checks/corp-device/) to ensure users can only access an application if they connect with the WARP client from a company device:
0 commit comments