Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Target devices directly in Gateway policies
description: Match device attributes in Gateway policies without creating separate device posture checks.
products:
- gateway
- cloudflare-one
date: 2026-12-08
---

Cloudflare Gateway now lets you target devices by their reported attributes without creating a device posture check first. For example, apply a policy to Windows devices, bypass inspection for an Android application, or match a list of company serial numbers directly in the rule builder.

The **Device attributes** group includes these selectors:

| Selector | Match devices by |
| --------------------- | ----------------------------------------------------- |
| Device OS | Operating system, with nested version conditions |
| Device Name | Hostname |
| Device Serial Number | Serial number, including reusable serial number lists |
| Device ID | Cloudflare physical-device UUID |
| Device Manufacturer | Hardware manufacturer |
| Device Model | Hardware model |
| Device Client Version | Cloudflare One Client version |

These selectors work in DNS, network, HTTP, resolver, and egress policies for enrolled Cloudflare One Clients. Egress policies require an Enterprise plan. Select one **Device OS** and choose **Add version** to add version comparisons or ranges. Device ID and Device Name provide searchable device suggestions and support manual entry.

In API and Terraform policies, put device attribute conditions in `identity`. For example, this expression targets macOS 14 devices:

```txt
device.os.type == "mac" and device.os.mac.version >= "14" and device.os.mac.version < "15"
```

Continue to use posture checks for device health requirements such as disk encryption and running processes. Existing posture-based policies continue to work.

For more information, refer to [Device attributes](/cloudflare-one/traffic-controls/device-attributes/).
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,17 @@ Many Android applications (such as Google Drive) use <GlossaryTooltip term="cert
<Tabs syncKey="dashPlusAPI">
<TabItem label="Dashboard">

<Steps>
1. Set up an [OS version device posture check](/cloudflare-one/reusable-components/posture-checks/client-checks/os-version/) that checks for the Android operating system.

2. Create the following HTTP policy in Gateway:
Create the following HTTP policy using [Device OS](/cloudflare-one/traffic-controls/device-attributes/) directly. No OS posture check is required:

| Selector | Operator | Value | Logic | Action |
| ---------------------------- | -------- | -------------------- | ----- | -------------- |
| Application | in | _Google Drive_ | And | Do Not Inspect |
| Passed Device Posture Checks | in | _OS Version Android_ | | |
</Steps>
| Selector | Operator | Value | Logic | Action |
| ----------- | -------- | -------------- | ----- | -------------- |
| Application | in | _Google Drive_ | And | Do Not Inspect |
| Device OS | is | _Android_ | | |

</TabItem>
<TabItem label="Cloudflare CLI (cf)">

Use `cf zero-trust gateway rules create` to manage Gateway rules. The DLP CLI command reference does not verify the expression syntax for this Do Not Inspect policy; confirm the posture-check and application selector expressions in a test account before applying the rule.
Use `cf zero-trust gateway rules create` to manage Gateway rules. The DLP CLI command reference does not verify the expression syntax for this Do Not Inspect policy; use `device.os.type == "android"` in `identity` and confirm the application selector expression before applying the rule.

</TabItem>
</Tabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,13 @@ You can use the [Cloudflare One Client](/cloudflare-one/networks/connectors/clou

If you cannot or do not want to install the certificate, you can create [Do Not Inspect](/cloudflare-one/traffic-controls/http-policies/#do-not-inspect) policies to exempt incompatible Cloudflare WAN traffic from inspection or to disable TLS decryption entirely.

Because Gateway cannot discern Cloudflare WAN traffic, you must use [Cloudflare One Client checks](/cloudflare-one/reusable-components/posture-checks/client-checks/) or the IP addresses associated with Cloudflare WAN to match traffic with Gateway policies.
Use the [Traffic Source selector](/cloudflare-one/traffic-controls/http-policies/#traffic-source) to match Cloudflare WAN traffic directly. You do not need OS posture checks to distinguish WAN traffic from Cloudflare One Client traffic:

For example, if your organization onboards devices to Cloudflare WAN using the Cloudflare One Client, you can exempt devices not running the Cloudflare One Client using [OS version checks](/cloudflare-one/reusable-components/posture-checks/client-checks/os-version/):
| Selector | Operator | Value | Action |
| -------------- | -------- | ---------------- | -------------- |
| Traffic Source | is | _Cloudflare WAN_ | Do Not Inspect |

| Selector | Operator | Value | Logic | Action |
| ---------------------------- | -------- | -------------------- | ----- | -------------- |
| Passed Device Posture Checks | not in | Windows (OS version) | Or | Do Not Inspect |
| Passed Device Posture Checks | not in | macOS (OS version) | Or | Do Not Inspect |
| Passed Device Posture Checks | not in | Linux (OS version) | Or | Do Not Inspect |
| Passed Device Posture Checks | not in | iOS (OS version) | Or | Do Not Inspect |
| Passed Device Posture Checks | not in | Android (OS version) | | Do Not Inspect |
For traffic from enrolled Cloudflare One Clients, use [device attribute selectors](/cloudflare-one/traffic-controls/device-attributes/) to target a specific OS, hostname, serial number, or physical-device ID. Device attributes require client device context and do not identify individual devices behind a WAN tunnel.

If your organization onboards users to Cloudflare WAN using an [on-ramp other than the Cloudflare One Client](/cloudflare-one/networks/connectors/cloudflare-wan/on-ramps/), you can exempt devices from inspection using the IP addresses for your IPsec tunnels:

Expand Down Expand Up @@ -127,6 +123,7 @@ If you are still testing Gateway and Cloudflare is not your default route, confi
Confirm there is an entry for the test in [HTTP Gateway Activity Logs](/cloudflare-one/insights/logs/dashboard-logs/gateway-logs/#http-logs).

Verify the following details:

- **Destination IP**: Should be the public IP address of `ifconfig.me`.
- **Source IP**: Should be the private (WAN) address of the host with the browser.
- **Outbound connection**: Should be sourced from a Cloudflare WAN IP address, not any public IP address that Cloudflare might be advertising on your behalf.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,18 @@ Cloudflare One allows you to build Zero Trust rules based on device serial numbe

## Create a list of serial numbers

To create rules based on device serial numbers, you first need to create a [Gateway List](/cloudflare-one/reusable-components/lists/) of numbers.
For Gateway, use the [Device Serial Number selector](/cloudflare-one/traffic-controls/device-attributes/) to enter serial numbers directly. To reuse a serial number list across Gateway or Access policies, create a [Gateway List](/cloudflare-one/reusable-components/lists/):

1. In the [Cloudflare dashboard](https://dash.cloudflare.com/), go to **Zero Trust** > **Reusable components** > **Lists**.

2. Select **Create manual list** or **Upload CSV**. For larger teams, we recommend uploading a CSV or using Cloudflare's [API endpoint](/api/resources/zero_trust/subresources/gateway/subresources/lists/methods/list/).

3. Give your list a descriptive name, as this name will appear when configuring your policies.

4. Set **List Type** to _Serial numbers_.

5. Enter the serial numbers of the devices your team manages, or upload your CSV file.

6. Select **Save**.

You can now create an [Access policy](/cloudflare-one/access-controls/policies/) or a Gateway [network policy](/cloudflare-one/traffic-controls/network-policies/common-policies/#enforce-device-posture) that checks if the device presents a serial number on your list. In Access, the serial number check will appear as a _Device Posture - Serial Number List_ selector. In Gateway, your serial number list will appear in the **Value** dropdown when you choose the [Passed Device Posture Check](/cloudflare-one/traffic-controls/network-policies/#device-posture) selector.
In Gateway, select **Device Serial Number**, choose **in list** or **not in list**, and select your list. No posture check is required. For an example, refer to [Target company devices](/cloudflare-one/traffic-controls/network-policies/common-policies/#target-company-devices).

In an [Access policy](/cloudflare-one/access-controls/policies/), use the _Device Posture - Serial Number List_ selector. Existing Gateway policies using the list through _Passed Device Posture Checks_ continue to work.

## Validate the serial number

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { Render } from "~/components";

Cloudflare One allows you to build Zero Trust rules based on device UUIDs supplied in an MDM file. You can create these rules so that access to applications is granted only to users connecting from company devices.

To target a device by its Cloudflare-assigned physical-device UUID in Gateway, use the [Device ID selector](/cloudflare-one/traffic-controls/device-attributes/#selectors). This posture check instead matches the `unique_client_id` value supplied through MDM.

## Prerequisites

- <Render
Expand All @@ -30,23 +32,17 @@ Cloudflare One allows you to build Zero Trust rules based on device UUIDs suppli
You will need to use a [managed deployment tool](/cloudflare-one/team-and-resources/devices/cloudflare-one-client/deployment/mdm-deployment/) to assign UUIDs. It is not possible to assign them manually.

1. Generate a unique identifier for each corporate device. For best practices on choosing UUIDs, refer to the [Android documentation](https://developer.android.com/training/articles/user-data-ids#best-practices-android-identifiers).

2. Enter the UUIDs into your MDM configuration file using the [`unique_client_id` key](/cloudflare-one/team-and-resources/devices/cloudflare-one-client/deployment/mdm-deployment/parameters/#unique_client_id).

## 2. Create a list of UUIDs

To create rules based on device UUIDs, you first need to create a [Gateway List](/cloudflare-one/reusable-components/lists/) of UUIDs.

1. In the [Cloudflare dashboard](https://dash.cloudflare.com/), go to **Zero Trust** > **Reusable components** > **Lists**.

2. Select **Create manual list** or **Upload CSV**. For larger teams, we recommend uploading a CSV or using Cloudflare's [API endpoint](/api/resources/zero_trust/subresources/gateway/subresources/lists/methods/list/).

3. Give your list a descriptive name, as this name will appear when configuring your policies.

4. Set **List Type** to _Device IDs_.

5. Enter the UUIDs of the devices your team manages, or upload your CSV file.

6. Select **Save**.

:::note
Expand All @@ -57,18 +53,13 @@ Hyphens are automatically stripped from UUIDs. For example, the posture check wi
## 3. Enable the posture check

1. In the [Cloudflare dashboard](https://dash.cloudflare.com/), go to **Zero Trust** > **Reusable components** > **Posture checks**.

2. Go to **Cloudflare One Client checks** and select **Add a check**.

3. Select **Unique Client ID**.

4. You will be prompted for the following information:
- **Name**: Enter a unique name for this device posture check.
- **Operating system**: Select the operating system of the device.
- **List**: Select your [list of UUIDs](#2-create-a-list-of-uuids).

5. Select **Save**.

6. [Verify](/cloudflare-one/reusable-components/posture-checks/#2-verify-device-posture-checks) that the posture check is returning the expected results.

You can now create an Access or Gateway device posture policy that checks if the device presents a UUID on your list.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { Render, TabItem, Tabs } from "~/components";

The OS Version device posture attribute checks whether the version of a device's operating system matches, is greater than or lesser than the configured value.

For Gateway policies, use [Device OS with nested version conditions](/cloudflare-one/traffic-controls/device-attributes/#operating-systems-and-versions) to match the OS and version directly. A posture check remains useful for Access policies or additional OS-specific checks, such as Linux distribution and Windows Update Build Revision.

## Prerequisites

- <Render
Expand All @@ -36,7 +38,7 @@ The OS Version device posture attribute checks whether the version of a device's

5. (Optional) Configure additional OS-specific fields:

<Tabs>
<Tabs>
<TabItem label="Windows">
To check that Windows devices have required security patches and features installed, include an Update Build Revision (UBR) number in the OS version check.
- **Update Build Revision**: Enter the Windows UBR you want devices to match (for example, `3803`). The UBR is the fourth part of the full Windows version number (for example, in `10.0.19045.3803`, the UBR is `3803`).
Expand Down Expand Up @@ -77,6 +79,7 @@ Operating systems display version numbers in different ways. This section covers
### Windows

Windows version numbers consist of four parts: `Major.Minor.Build.UBR`. For example, `10.0.19045.3803` where:

- `10.0` is the **Version** (Major.Minor)
- `19045` is the **Build** number
- `3803` is the **UBR** (Update Build Revision)
Expand Down Expand Up @@ -107,7 +110,6 @@ To determine the Windows version on your device:
The Linux OS version check reads the system kernel version.

1. Open a Terminal window.

2. Run the `uname -r` command to get the complete kernel version. For example,

```sh
Expand All @@ -116,7 +118,6 @@ The Linux OS version check reads the system kernel version.
```

3. **Version** is the first three numbers of the output in SemVer format (`5.14.0`).

4. **Patch Version** is the first number after the SemVer (`25`).

#### Distro version
Expand All @@ -126,7 +127,6 @@ The Cloudflare One Client reads **Distro name** and **Distro revision** from the
To determine the Linux distro version on your device:

1. Open a Terminal window.

2. Get the OS identification fields that contain `ID`:

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ import { Render } from "~/components";

With Cloudflare Zero Trust, you can configure Zero Trust policies that rely on additional signals from the Cloudflare One Client or from third-party endpoint security providers. When device posture checks are configured, users can only connect to a protected application or network resource if they have a managed or healthy device.

## Device attributes in Gateway

To target devices by OS, hostname, serial number, physical-device ID, hardware, or client version, use [Gateway device attribute selectors](/cloudflare-one/traffic-controls/device-attributes/) directly. You do not need to create a posture check for those attributes. Use posture checks for health requirements such as disk encryption, running processes, and endpoint security provider results.

The following setup applies to posture checks used in Access and Gateway.

## 1. Enable device posture checks

Setup instructions and requirements vary depending on the device posture attribute. Refer to the links below to view the setup guide for your provider.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Details, Render } from "~/components";

<Details header="Feature availability">

| [Client modes](/cloudflare-one/team-and-resources/devices/cloudflare-one-client/configure/modes/) | [Zero Trust plans](https://www.cloudflare.com/teams-pricing/) |
| [Client modes](/cloudflare-one/team-and-resources/devices/cloudflare-one-client/configure/modes/) | [Zero Trust plans](https://www.cloudflare.com/teams-pricing/) |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| <ul><li> Traffic and DNS mode</li><li> DNS only mode </li><li> Traffic only mode </li><li> Local proxy mode </li></ul> | All plans |

Expand Down Expand Up @@ -63,11 +63,13 @@ Devices enrolled via a service token are identified by the email address `non_id

<Details header="Example Gateway network policy">

| Selector | Operator | Value | Logic |
| ---------------------------- | -------- | ----------------------------------------------- | ----- |
| Destination IP | in list | `Active Directory servers` | And |
| User email | in | `non_identity@<team-name>.cloudflareaccess.com` | And |
| Passed Device Posture Checks | in | `Windows 10 or higher (OS version)` | |
| Selector | Operator | Value | Logic |
| -------------- | -------- | ----------------------------------------------- | ----- |
| Destination IP | in list | `Active Directory servers` | And |
| User email | in | `non_identity@<team-name>.cloudflareaccess.com` | And |
| Device OS | is | _Windows_, version `>= 10.0` | |

To add the OS version condition, select **Device OS**, choose _Windows_, and select **Add version** with the `>=` operator. [Device attributes](/cloudflare-one/traffic-controls/device-attributes/) do not require a separate posture check.

| Action |
| ------ |
Expand Down
Loading