Skip to content

Commit 71530de

Browse files
committed
Add duration section
1 parent a6ed729 commit 71530de

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/content/docs/cloudflare-one/policies/gateway/dns-policies/timed-dns-policies.mdx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,25 @@ sidebar:
55
order: 3
66
---
77

8-
Cloudflare Gateway allows you to configure any DNS policy to activate or deactivate on a regular time interval.
8+
By default, Cloudflare Gateway policies apply at all times when turned on. Gateway allows you to configure any DNS policy to activate for a specific amount of time or on a regular time interval.
9+
10+
## Time-based policy duration
11+
12+
You can use a time-based policy duration to set a specific time frame for the policy to be active or configure a specific time for the policy to expire. With _Duration_, you can set a policy to turn on for a specific amount of time. With _Exact end time_, you can define a specific time for the policy to expire.
13+
14+
To set a duration for a DNS policy:
15+
16+
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Gateway** > **Firewall policies** > **DNS**.
17+
2. Create a new DNS policy or choose an existing policy and select **Edit**.
18+
3. In **Configure policy settings**, turn on **Set a policy duration**.
19+
4. Choose _Duration_ and enter a specific amount of time or choose _Exact end time_ and enter a specific date and time to end.
20+
5. Select **Save policy**.
21+
22+
When a policy expires, it will remain inactive until turned back on. You can reset the policy duration, which will turn the policy back on for the set time duration.
923

1024
## Scheduled policies
1125

12-
By default, Gateway policies are unscheduled and apply at all times. You can use the [Gateway Rules API](/api/operations/zero-trust-gateway-rules-create-zero-trust-gateway-rule) to create a new DNS policy with a schedule or add a schedule to an existing policy. To schedule a policy, send a [`POST`](/api/operations/zero-trust-gateway-rules-create-zero-trust-gateway-rule) or [`PUT`](/api/operations/zero-trust-gateway-rules-update-zero-trust-gateway-rule) request with the `schedule` parameter set to your desired days of the week, times of day, and an optional time zone. The schedule will appear in Zero Trust under **Gateway** > **Firewall Policies** > **DNS** when you expand the row for the policy.
26+
You can use the [Gateway Rules API](/api/operations/zero-trust-gateway-rules-create-zero-trust-gateway-rule) to create a new DNS policy with a schedule or add a schedule to an existing policy. To schedule a policy, send a [`POST`](/api/operations/zero-trust-gateway-rules-create-zero-trust-gateway-rule) or [`PUT`](/api/operations/zero-trust-gateway-rules-update-zero-trust-gateway-rule) request with the `schedule` parameter set to your desired days of the week, times of day, and an optional time zone. The schedule will appear in Zero Trust under **Gateway** > **Firewall policies** > **DNS** when you expand the row for the policy.
1327

1428
### How Gateway determines time zone
1529

0 commit comments

Comments
 (0)