Mô-đun 3b — Cấu hình hồ sơ thiết bị
Mục tiêu: Áp dụng cài đặt Cloudflare One Client khác nhau cho các nhóm thiết bị khác nhau — để laptop được quản lý, điện thoại BYOD, máy chủ và nhà thầu mỗi loại nhận đúng chế độ, split-tunnel và hành vi DNS.
|
|
| 👤 Ai làm việc này |
Đội Endpoint / Desktop |
| ⏱️ Thời gian |
~30 phút |
| 🎯 Kết thúc bạn sẽ có |
Một hoặc nhiều hồ sơ thiết bị tùy chỉnh tự động áp dụng cho đúng thiết bị, theo đúng thứ tự |
| ✋ Trước khi bắt đầu |
Mô-đun 3 hoàn tất (ít nhất một thiết bị đã đăng ký và Connected) |
Đây là phần chuyên sâu tùy chọn, mở rộng Phần B của Mô-đun 3. Nếu mọi thiết bị trong tổ chức bạn nên hoạt động giống nhau, một hồ sơ Default là đủ — quay lại đây khi bạn cần laptop, BYOD, máy chủ hoặc nhà thầu khác biệt.
Hồ sơ thiết bị là gì
Một hồ sơ thiết bị (device profile) là một gói có tên gồm các cài đặt Cloudflare One Client (chế độ, split tunnels, hành vi DNS, switch lock, v.v.) cùng quy tắc khớp quyết định hồ sơ áp dụng cho thiết bị nào. Khi thiết bị kết nối, Cloudflare chọn một hồ sơ cho nó dựa trên các quy tắc đó.
Có hai lớp cài đặt:
| Lớp |
Áp dụng cho |
Ví dụ |
| Global device client settings |
Mọi thiết bị đã đăng ký, luôn luôn |
Mã admin override, emergency disconnect, quyền local-network-exclusion |
| Device profile settings |
Chỉ thiết bị khớp quy tắc của hồ sơ đó |
Client mode, split tunnels, local domain fallback, auto-connect, switch lock |
📺 Chúng nằm ở đâu: Zero Trust → Team & Resources → Devices → Device profiles. Hồ sơ nằm dưới General profiles. (Bảng điều khiển cũ đặt mục này dưới Settings → WARP Client — cùng tính năng.)
⏱️ Lưu ý: thay đổi có thể mất tới 10 phút mới tới thiết bị.
Năm chế độ client (quyết định mục này trước, theo từng hồ sơ)
Chế độ (mode) là cài đặt quan trọng nhất trong hồ sơ — nó quyết định tính năng Zero Trust nào hoạt động trên thiết bị đó.
| Chế độ |
Gửi gì tới Cloudflare |
Dùng cho |
| Gateway with WARP |
DNS và toàn bộ lưu lượng mạng (tunnel) |
⭐ Chuẩn cho thiết bị được quản lý — lọc web đầy đủ, DLP, ZTNA, posture |
| Gateway with DoH |
Chỉ DNS (qua HTTPS) |
Lọc DNS khi bạn không thể/không muốn tunnel toàn bộ lưu lượng |
| Secure Web Gateway (without DNS filtering) |
Lưu lượng mạng, nhưng không DNS |
Khi Cloudflare không điều khiển được DNS trên thiết bị |
| Proxy mode |
Chỉ lưu lượng HTTP (qua proxy cục bộ) |
Tình huống app/dev cần lọc HTTP chọn lọc |
| Device Information Only |
Không proxy gì — chỉ tín hiệu posture |
Truy cập Clientless / Browser Isolation khi bạn vẫn muốn device posture |
💡 Mẹo: Hầu hết tổ chức dùng Gateway with WARP cho laptop được quản lý và Device Information Only (hoặc Gateway with WARP chế độ Include) cho BYOD.
Phần A — Tạo hồ sơ thiết bị
- 👉 Zero Trust → Team & Resources → Devices → Device profiles → General profiles.
- 👉 Nhấp Create new profile.
- 📺 Bạn sẽ thấy: hồ sơ mới bắt đầu là một bản sao của hồ sơ Default, nên bạn chỉ đổi những gì khác biệt.
- ⌨️ Name hồ sơ cho rõ, ví dụ
BYOD phones hoặc Linux servers.
- 👉 Tạo quy tắc khớp xác định thiết bị nào nhận hồ sơ này — xem Phần B.
- 👉 Cấu hình cài đặt client cho các thiết bị này (mode, switch lock, auto-connect, v.v.).
- 👉 Nhấp Create profile.
- ⚠️ Lưu ý: Split Tunnels và Local Domain Fallback chỉ chỉnh được sau khi bạn lưu hồ sơ. Tạo trước, rồi mở lại để đặt các mục đó (Phần D và Phần E).
- 👉 Quay lại danh sách, kéo hồ sơ vào đúng vị trí — thứ tự rất quan trọng (Phần C).
✅ Điểm kiểm tra: Hồ sơ mới của bạn xuất hiện trong danh sách Profile settings, phía trên hồ sơ Default.
Phần B — Quy tắc khớp (selectors)
Quy tắc khớp quyết định thiết bị nào dùng hồ sơ. Bạn xây chúng từ selectors, operators và values.
⚠️ Selector dựa trên danh tính (email, groups, SAML) chỉ hoạt động nếu người dùng đăng ký bằng cách đăng nhập vào IdP của bạn. Thiết bị đăng ký bằng service token không khớp theo danh tính — hãy dùng OS, managed network hoặc service token thay thế.
| Selector |
Khớp theo |
Biểu thức ví dụ |
| User email |
Email của một người dùng cụ thể |
identity.email == "jane@acme.com" |
| User group emails |
Địa chỉ email của một nhóm IdP |
identity.groups.email == "contractors@acme.com" |
| User group IDs |
ID nhóm IdP |
identity.groups.id == "12jf495bhjd..." |
| User group names |
Tên nhóm IdP |
identity.groups.name == "finance" |
| Operating system |
Loại hệ điều hành |
os.name in {"windows" "mac"} |
| Operating system version |
Một phiên bản hệ điều hành cụ thể |
os.version == "14.5.0" |
| Managed network |
Thiết bị có đang trên mạng bạn đã định nghĩa hay không |
(khớp managed network bạn đã cấu hình) |
| SAML attributes |
Một cặp tên/giá trị từ IdP SAML |
(tên thuộc tính + giá trị) |
| Service token |
Thiết bị đăng ký bằng một service token cụ thể |
(token) |
Operators:
| Loại |
Operator |
Ý nghĩa |
| Comparison |
is |
Bằng giá trị |
| Comparison |
in |
Khớp ít nhất một trong nhiều giá trị |
| Logical |
And |
Phải khớp tất cả điều kiện |
| Logical |
Or |
Phải khớp bất kỳ điều kiện nào |
💡 Ví dụ — hồ sơ "Contractors": Selector User group names · operator is · value contractors. Giờ bất kỳ ai trong nhóm contractors của IdP tự động nhận cài đặt (chặt hơn) của hồ sơ này.
Phần C — Thứ tự ưu tiên (cách thiết bị được khớp)
Đây là phần người ta hay làm sai nhất, nên cần hiểu rõ:
- Khi thiết bị kết nối, Cloudflare đọc danh sách hồ sơ từ trên xuống dưới.
- Nó dùng hồ sơ đầu tiên mà thiết bị khớp — rồi dừng. Không hồ sơ nào phía dưới có thể ghi đè.
- Hồ sơ Default luôn được ghim ở cuối và chỉ áp dụng nếu thiết bị không khớp gì phía trên.
Profile list (evaluated top ↓ bottom) A Windows laptop in "finance" group…
┌─────────────────────────────────────┐
│ 1. Linux servers (os = linux) │ ✗ not linux
│ 2. Finance team (group finance)│ ✓ MATCH → gets this profile, stops here
│ 3. BYOD phones (os = ios/andr)│ (never evaluated)
│ 4. Default (always last) │ (never evaluated)
└─────────────────────────────────────┘
⚠️ Lưu ý: đặt hồ sơ cụ thể nhất cao hơn, và hồ sơ rộng hơn ở dưới. Nếu một hồ sơ rộng (ví dụ "all Windows") nằm trên một hồ sơ hẹp (ví dụ "Windows in finance"), hồ sơ hẹp sẽ không bao giờ khớp.
💡 Mẹo: Nếu bạn nâng một hồ sơ tùy chỉnh thành Default, toàn bộ cài đặt của nó được sao chép vào hồ sơ Default.
Phần D — Split Tunnels (theo từng hồ sơ)
Split Tunnels quyết định lưu lượng IP nào đi qua Cloudflare so với đi vòng Cloudflare. Cấu hình sau khi lưu hồ sơ (mở hồ sơ → Split Tunnels → Manage).
Lý do thường dùng: chạy Cloudflare One Client cùng với VPN (chế độ Exclude), hoặc cấp quyền truy cập một mạng riêng cụ thể (chế độ Include).
Hai chế độ
| Chế độ |
Hành vi |
Phù hợp nhất cho |
| Exclude (mặc định) |
Mọi thứ đi qua Cloudflare trừ những gì bạn liệt kê |
⭐ Thiết bị công ty được quản lý |
| Include |
Chỉ những gì bạn liệt kê đi qua Cloudflare; mọi thứ khác ở lại cục bộ và không còn bị lọc bởi chính sách network/HTTP của bạn |
⭐ BYOD / thiết bị cá nhân (giữ lưu lượng cá nhân ở chế độ riêng tư) |
⚠️ Đổi chế độ sẽ xóa các mục của bạn. Khi bạn chuyển giữa Exclude và Include, danh sách trở về mặc định của Cloudflare. Sao chép các mục hiện tại trước (Manage → ghi lại) để bạn thêm lại được.
🔑 Split Tunnels chỉ ảnh hưởng lưu lượng IP — không phải DNS
Đây là điểm bị hiểu nhầm nhiều nhất. Split Tunnels điều khiển nơi gói IP chảy. DNS là riêng: ngay cả khi bạn exclude IP của một site, truy vấn DNS của nó vẫn được Gateway phân giải (và chịu chính sách DNS của bạn) trừ khi bạn cũng thêm domain đó vào Local Domain Fallback (Phần E). Split Tunnels và Local Domain Fallback được thiết kế để hoạt động cùng nhau cho tài nguyên nội bộ.
Loại mục — địa chỉ IP so với domain
Khi bạn nhấp Manage → add, bạn chọn IP Address hoặc Domain:
- IP address / CIDR (⭐ ưu tiên) — ví dụ
10.0.0.0/8. Nhanh và dễ dự đoán. Để tách một dải nhỏ ra khỏi dải lớn hơn, dùng bộ tính CIDR có sẵn trong giao diện.
- Domain — ví dụ
example.com. Khi người dùng truy cập, domain được phân giải (bởi Gateway, hoặc bởi DNS nội bộ qua Local Domain Fallback), rồi Split Tunnels động include/exclude IP được trả về. Nếu domain không có bản ghi DNS công khai, bạn phải thêm mục Local Domain Fallback (Phần E) để nó phân giải được.
💡 Ưu tiên IP hơn domain. Domain chậm hơn — client phải tra IP tức thì và viết lại bảng định tuyến / tường lửa cục bộ mỗi lần. Giữ danh sách ngắn: mỗi mục thêm thời gian phân tích, và có giới hạn theo tài khoản.
Các mặc định cần biết
- Chế độ Exclude đã exclude sẵn dải riêng tư RFC 1918, dải CGNAT
100.64.0.0/10 (dùng bởi dịch vụ Cloudflare One), và các dải multicast.
- ⚠️ Nếu bạn cần tới ứng dụng/hostname nội bộ qua client:
- Chế độ Exclude: gỡ
100.64.0.0/10 khỏi danh sách exclude (và thêm lại các dải CGNAT không phải của Cloudflare mà bạn thực sự dùng cục bộ, để tránh xung đột).
- Chế độ Include: thêm các dải này để hostname nội bộ phân giải được — IPv4
100.80.0.0/16 và IPv6 2606:4700:0cf1:4000::/64, cộng CIDR của mạng riêng bạn.
Các trường hợp dùng chế độ Exclude phổ biến
- Microsoft 365 / Teams / Zoom / VoIP — ứng dụng cần IP thiết bị thật của người dùng, hoặc nhạy với độ trễ, thường chạy tốt hơn khi bị exclude. (Có tùy chọn một cú nhấp Directly route Microsoft 365 traffic trong device settings.)
- Chạy cạnh VPN hiện có trong giai đoạn chuyển đổi từng bước.
⚠️ Đánh đổi: bất cứ thứ gì bạn exclude đều bỏ qua Gateway — bạn mất lọc, DLP và ghi log cho lưu lượng đó. Đừng exclude đích nếu bạn cần khả năng quan sát hoặc chính sách trên nó.
💡 Mẹo: Để định tuyến một mạng riêng (ví dụ 10.50.0.0/16) tới người dùng, thêm CIDR đó ở chế độ Include, hoặc đảm bảo nó không bị exclude ở chế độ Exclude.
Phần E — Local Domain Fallback
Local Domain Fallback (LDF) bảo client phân giải một số domain bằng bộ phân giải DNS nội bộ/riêng bạn quản lý, thay vì gửi các truy vấn DNS đó tới Cloudflare Gateway. Client proxy các tra cứu khớp trực tiếp tới các máy chủ DNS bạn chỉ định.
Dùng cho: Active Directory, *.internal, và các domain chỉ nội bộ khác mà DNS công cộng (và Cloudflare) không phân giải được — đặc biệt khi máy chủ DNS chỉ tới được từ thiết bị của người dùng.
Mặc định có sẵn (đã xử lý sẵn cho bạn)
Ngay từ đầu, Zero Trust giữ các top-level domain phân giải cục bộ phổ biến ngoài Gateway và để bộ phân giải của chính thiết bị xử lý chúng. Các hậu tố mặc định là:
corp · domain · home · home.arpa · host · internal · intranet · invalid · lan · local · localdomain · localhost · private · test
Bạn chỉ cần thêm mục cho các domain nội bộ ngoài danh sách đó (ví dụ acme.internal, ad.acme.com).
Cách thêm một mục
- 👉 Mở hồ sơ → Local Domain Fallback → Manage (chỉ chỉnh được sau khi hồ sơ đã lưu).
- ⌨️ Domain — nhập domain apex, ví dụ
example.com. Nó được xem như *.example.com, nên mọi subdomain đều được bao phủ.
- ⌨️ DNS Servers — nhập IP của (các) bộ phân giải sẽ trả lời (ví dụ
10.0.0.25). Giữ ≤ 8 máy chủ để hiệu năng tốt. Client truy vấn tất cả và dùng phản hồi nhanh nhất — kể cả khi phản hồi đó là "không tìm thấy bản ghi", nên luôn chỉ định ít nhất một máy chủ đáng tin. (Để trống thì client quay về DNS mà thiết bị dùng trước khi WARP khởi động.)
- ⌨️ Thêm description tùy chọn → Save domain.
LDF được phạm vi theo từng hồ sơ thiết bị. Hồ sơ không có tài nguyên LDF chỉ dùng các hậu tố mặc định ở trên.
⚠️ Giới hạn quan trọng — không có khả năng quan sát Gateway
Các truy vấn DNS do Local Domain Fallback xử lý bỏ qua bộ phân giải Gateway, nên chúng không chịu chính sách DNS của Gateway và không xuất hiện trong nhật ký DNS. Nếu bạn cần lọc hoặc ghi log DNS nội bộ, hãy dùng resolver policies thay thế.
LDF so với resolver policies — nên dùng cái nào?
|
Local Domain Fallback |
Resolver policies |
| Chạy ở đâu |
Trên thiết bị (phía client) |
Trong Cloudflare Gateway |
| Dùng khi |
Máy chủ DNS chỉ tới được từ thiết bị |
Máy chủ DNS tới được từ mạng Cloudflare (qua Tunnel, IPsec/GRE, hoặc Internet công cộng) |
| Ghi log / chính sách DNS |
❌ Không |
✅ Có (quan sát tốt hơn) |
⭐ Khuyến nghị: nếu máy chủ DNS của bạn tới được một on-ramp Cloudflare, hãy ưu tiên resolver policies vì có ghi log/khả năng quan sát. Nếu cả hai đều được cấu hình trên cùng thiết bị, quy tắc Local Domain Fallback áp dụng trước.
⚠️ Cạm bẫy AWS: đừng định tuyến toàn bộ *.amazonaws.com tới bộ phân giải Route 53 nội bộ — các endpoint AWS công cộng (ví dụ ssm.us-east-1.amazonaws.com) sẽ không phân giải được và tính năng bị hỏng. Chỉ định tuyến các zone Route 53 cụ thể hoặc VPC endpoint (vpce.amazonaws.com).
Xác minh
- 👉 Trên thiết bị, chạy
warp-cli settings và kiểm tra phần fallback domains để xác nhận các mục của bạn đã được áp dụng.
Phần F — Cài đặt client thiết bị toàn cục (mọi thiết bị)
Các mục này nằm ngoài hồ sơ và áp dụng toàn tổ chức. Tìm chúng dưới Team & Resources → Devices → Device settings (phần global):
| Cài đặt |
Nó làm gì |
Khuyến nghị |
| Allow admin override codes |
Cho phép quản trị viên tạo mã để người dùng tạm tắt client |
Bật cho hỗ trợ IT, chia sẻ mã cẩn thận |
| Allow users to enable local network exclusion |
Cho phép người dùng exclude mạng cục bộ của họ — cách xử lý khi mạng nhà dùng trùng dải IP công ty |
Chỉ bật nếu cần; yêu cầu chế độ Exclude |
| Global / emergency disconnect |
Buộc ngắt (hoặc kết nối lại) tất cả client khi sự cố/mất dịch vụ — kể cả qua tín hiệu HTTPS on-prem bên ngoài |
Thiết lập trước khi bạn cần dùng |
Phần G — Xác minh thiết bị nhận hồ sơ nào
Qua bảng điều khiển:
- 👉 Team & Resources → Devices → mở một thiết bị → kiểm tra hồ sơ được gán.
Qua thiết bị (CLI):
warp-cli settings
- 📺 Tìm trường
Profile ID — nó hiện UUID của hồ sơ đang được áp dụng.
✅ Điểm kiểm tra: Thiết bị thử nghiệm báo đúng hồ sơ bạn kỳ vọng (ví dụ thiết bị BYOD hiện hồ sơ BYOD, không phải Default).
Ví dụ mẫu (sao chép các mẫu này)
| Hồ sơ (thứ tự) |
Quy tắc khớp |
Cài đặt chính |
| 1. Linux servers |
os.name is linux |
Mode: Gateway with WARP · Switch locked · đăng ký bằng service-token |
| 2. Finance (strict) |
identity.groups.name is finance |
Mode: Gateway with WARP · auto-connect ngắn · posture chặt hơn yêu cầu ở hạ nguồn |
| 3. BYOD phones |
os.name in {ios android} |
Mode: Gateway with WARP · split tunnel Include (chỉ ứng dụng công ty) |
| 4. Contractors |
identity.groups.name is contractors |
Mode: Device Information Only hoặc Include split tunnel · switch locked |
| 5. Default |
(luôn cuối cùng) |
Mode: Gateway with WARP · Exclude split tunnel |
✅ Mô-đun 3b hoàn tất!
Bạn hiện có:
- ✅ Hiểu cài đặt global so với cài đặt hồ sơ và năm chế độ client
- ✅ Một hoặc nhiều hồ sơ thiết bị tùy chỉnh với quy tắc khớp
- ✅ Thứ tự ưu tiên đúng (hồ sơ cụ thể trên hồ sơ rộng)
- ✅ Split tunnels và local domain fallback theo hồ sơ đã đặt khi cần
- ✅ Cách xác minh thiết bị nhận hồ sơ nào
Khắc phục sự cố nhanh
| Vấn đề |
Cách xử lý |
| Thiết bị nhận sai hồ sơ |
Kiểm tra thứ tự ưu tiên — một hồ sơ rộng hơn phía trên đã khớp trước (Phần C). Đưa hồ sơ cụ thể lên trên |
| Selector danh tính không bao giờ khớp |
Thiết bị được đăng ký bằng service token, không phải đăng nhập IdP — selector danh tính không áp dụng; dùng selector OS/managed-network/service-token (Phần B) |
| Không thấy Split Tunnels / Local Domain Fallback khi tạo |
Chúng chỉ chỉnh được sau khi lưu hồ sơ — tạo rồi mở lại (Phần D–E) |
| Ứng dụng nội bộ không tới được trên thiết bị |
Sửa split tunnels: gỡ 100.64.0.0/10 (Exclude) hoặc thêm 100.80.0.0/16 + IPv6 (Include) cộng CIDR của bạn (Phần D) |
| Thay đổi cài đặt chưa có hiệu lực |
Cho phép tới 10 phút để lan truyền; rồi kết nối lại client |
| Mạng nhà bị hỏng khi đã kết nối |
Bật local network exclusion (cài đặt global; yêu cầu chế độ Exclude) (Phần F) |
Xuất bản ứng dụng nội bộ đầu tiên và thay thế truy cập VPN tới nó.
Module 3b — Device Profiles Configuration
Goal: Apply different Cloudflare One Client settings to different groups of devices — so managed laptops, BYOD phones, servers, and contractors each get exactly the right mode, split-tunnel, and DNS behavior.
|
|
| 👤 Who does this |
Endpoint / Desktop team |
| ⏱️ Time |
~30 minutes |
| 🎯 You'll finish with |
One or more custom device profiles that automatically apply to the right devices, in the right order |
| ✋ Before you begin |
Module 3 complete (at least one device enrolled and Connected) |
This is an optional deep-dive that expands Part B of Module 3. If every device in your org should behave identically, the single Default profile is enough — come back here when you need laptops, BYOD, servers, or contractors to differ.
What a device profile is
A device profile is a named bundle of Cloudflare One Client settings (mode, split tunnels, DNS behavior, switch lock, etc.) plus match rules that decide which devices it applies to. When a device connects, Cloudflare picks one profile for it based on those rules.
There are two layers of settings:
| Layer |
Applies to |
Examples |
| Global device client settings |
Every enrolled device, always |
Admin override codes, emergency disconnect, local-network-exclusion permission |
| Device profile settings |
Only devices that match that profile's rules |
Client mode, split tunnels, local domain fallback, auto-connect, switch lock |
📺 Where these live: Zero Trust → Team & Resources → Devices → Device profiles. Profiles are under General profiles. (Older dashboards put this under Settings → WARP Client — same feature.)
⏱️ Heads-up: changes can take up to 10 minutes to reach devices.
The five client modes (decide this per profile first)
The mode is the most important setting in a profile — it decides which Zero Trust features work on that device.
| Mode |
What it sends to Cloudflare |
Use it for |
| Gateway with WARP |
DNS and all network traffic (tunnel) |
⭐ Standard for managed devices — full web filtering, DLP, ZTNA, posture |
| Gateway with DoH |
DNS only (over HTTPS) |
DNS filtering when you can't/don't want to tunnel all traffic |
| Secure Web Gateway (without DNS filtering) |
Network traffic, but not DNS |
When Cloudflare can't control DNS on the device |
| Proxy mode |
HTTP traffic only (via a local proxy) |
App/dev scenarios needing selective HTTP filtering |
| Device Information Only |
Nothing is proxied — posture signals only |
Clientless / Browser Isolation access where you still want device posture |
💡 Tip: Most organizations use Gateway with WARP for managed laptops and Device Information Only (or Include-mode Gateway with WARP) for BYOD.
Part A — Create a device profile
- 👉 Zero Trust → Team & Resources → Devices → Device profiles → General profiles.
- 👉 Click Create new profile.
- 📺 What you'll see: the new profile starts as a copy of your Default profile, so you only change what's different.
- ⌨️ Name the profile clearly, e.g.
BYOD phones or Linux servers.
- 👉 Create the match rules that define which devices get this profile — see Part B.
- 👉 Configure the client settings for these devices (mode, switch lock, auto-connect, etc.).
- 👉 Click Create profile.
- ⚠️ Watch out: Split Tunnels and Local Domain Fallback can only be edited after you save the profile. Create it first, then reopen it to set those (Part D and Part E).
- 👉 Back in the list, drag the profile into the right position — order matters (Part C).
✅ Checkpoint: Your new profile appears in the Profile settings list, above the Default profile.
Part B — Match rules (selectors)
Match rules decide which devices use the profile. You build them from selectors, operators, and values.
⚠️ Identity-based selectors (email, groups, SAML) only work if the user enrolled by logging in to your IdP. Service-token-enrolled devices can't match on identity — use OS, managed network, or service token instead.
| Selector |
Matches on |
Example expression |
| User email |
A specific user's email |
identity.email == "jane@acme.com" |
| User group emails |
An IdP group's email address |
identity.groups.email == "contractors@acme.com" |
| User group IDs |
An IdP group ID |
identity.groups.id == "12jf495bhjd..." |
| User group names |
An IdP group name |
identity.groups.name == "finance" |
| Operating system |
OS type |
os.name in {"windows" "mac"} |
| Operating system version |
A specific OS version |
os.version == "14.5.0" |
| Managed network |
Whether the device is on a network you defined |
(matches your configured managed network) |
| SAML attributes |
A name/value from a SAML IdP |
(attribute name + value) |
| Service token |
Devices enrolled with a specific service token |
(the token) |
Operators:
| Type |
Operator |
Meaning |
| Comparison |
is |
Equals the value |
| Comparison |
in |
Matches at least one of several values |
| Logical |
And |
Must match all conditions |
| Logical |
Or |
Must match any condition |
💡 Example — a "Contractors" profile: Selector User group names · operator is · value contractors. Now anyone in your IdP's contractors group automatically gets this profile's (tighter) settings.
Part C — Order of precedence (how a device gets matched)
This is the part people most often get wrong, so it's worth understanding clearly:
- When a device connects, Cloudflare reads the profile list top to bottom.
- It uses the first profile the device matches — then stops. No profile lower down can override it.
- The Default profile is always pinned at the bottom and applies only if the device matched nothing above it.
Profile list (evaluated top ↓ bottom) A Windows laptop in "finance" group…
┌─────────────────────────────────────┐
│ 1. Linux servers (os = linux) │ ✗ not linux
│ 2. Finance team (group finance)│ ✓ MATCH → gets this profile, stops here
│ 3. BYOD phones (os = ios/andr)│ (never evaluated)
│ 4. Default (always last) │ (never evaluated)
└─────────────────────────────────────┘
⚠️ Watch out: put your most specific profiles higher, and broader ones lower. If a broad profile (e.g. "all Windows") sits above a narrow one (e.g. "Windows in finance"), the narrow one will never match.
💡 Tip: If you promote a custom profile to be the Default, all of its settings are copied into the Default profile.
Part D — Split Tunnels (per profile)
Split Tunnels decide which IP traffic goes through Cloudflare vs. around it. Configure it after saving the profile (open the profile → Split Tunnels → Manage).
Common reasons to use it: run the Cloudflare One Client alongside a VPN (Exclude mode), or grant access to one specific private network (Include mode).
The two modes
| Mode |
Behavior |
Best for |
| Exclude (default) |
Everything goes through Cloudflare except what you list |
⭐ Managed corporate devices |
| Include |
Only what you list goes through Cloudflare; everything else stays local and is no longer filtered by your network/HTTP policies |
⭐ BYOD / personal devices (keeps personal traffic private) |
⚠️ Switching modes wipes your entries. When you change between Exclude and Include, the list reverts to Cloudflare's defaults. Copy your current entries first (Manage → note them down) so you can re-add them.
🔑 Split Tunnels only affect IP traffic — not DNS
This is the single most misunderstood point. Split Tunnels control where IP packets flow. DNS is separate: even if you exclude a site's IP, its DNS query is still resolved by Gateway (and subject to your DNS policies) unless you also add that domain to Local Domain Fallback (Part E). Split Tunnels and Local Domain Fallback are designed to work together for private resources.
Entry types — IP address vs domain
When you click Manage → add, you choose IP Address or Domain:
- IP address / CIDR (⭐ preferred) — e.g.
10.0.0.0/8. Fast and predictable. To carve a smaller range out of a larger one, use the built-in CIDR calculator in the UI.
- Domain — e.g.
example.com. When a user visits it, the domain is resolved (by Gateway, or by your private DNS via Local Domain Fallback), and Split Tunnels then dynamically include/exclude the returned IP. If the domain has no public DNS record, you must add a Local Domain Fallback entry (Part E) so it can resolve.
💡 Prefer IPs over domains. Domains are slower — the client must do on-the-fly IP lookups and rewrite the routing table / local firewall each time. Keep the list short: every entry adds parsing time, and there are per-account limits.
Defaults to know
- Exclude mode already excludes RFC 1918 private ranges, the CGNAT range
100.64.0.0/10 (used by Cloudflare One services), and multicast ranges.
- ⚠️ If you need to reach private apps/hostnames via the client:
- Exclude mode: remove
100.64.0.0/10 from the exclude list (and add back any non-Cloudflare CGNAT ranges you actually use locally, to avoid conflicts).
- Include mode: add these so private hostnames resolve — IPv4
100.80.0.0/16 and IPv6 2606:4700:0cf1:4000::/64, plus your private network's own CIDRs.
Common Exclude-mode use cases
- Microsoft 365 / Teams / Zoom / VoIP — apps that need the user's real device IP, or are latency-sensitive, often perform better excluded. (There's a one-click Directly route Microsoft 365 traffic option in device settings.)
- Running beside an existing VPN during a phased migration.
⚠️ Trade-off: anything you exclude bypasses Gateway — you lose filtering, DLP, and logging for that traffic. Don't exclude a destination if you need visibility or policy on it.
💡 Tip: To route a private network (e.g. 10.50.0.0/16) to users, add that CIDR in Include mode, or make sure it isn't excluded in Exclude mode.
Part E — Local Domain Fallback
Local Domain Fallback (LDF) tells the client to resolve certain domains using a private/internal DNS resolver you manage, instead of sending those DNS queries to Cloudflare Gateway. The client proxies matching lookups directly to the DNS servers you specify.
Use it for: Active Directory, *.internal, and other private-only domains that public DNS (and Cloudflare) can't resolve — especially when the DNS server is reachable only from the user's device.
Built-in defaults (already handled for you)
Out of the box, Zero Trust keeps common local-resolution top-level domains off Gateway and lets the device's own resolver handle them. The default suffixes are:
corp · domain · home · home.arpa · host · internal · intranet · invalid · lan · local · localdomain · localhost · private · test
You only need to add entries for private domains outside that list (e.g. acme.internal, ad.acme.com).
How to add an entry
- 👉 Open the profile → Local Domain Fallback → Manage (editable only after the profile is saved).
- ⌨️ Domain — enter the apex domain, e.g.
example.com. It's treated as *.example.com, so all subdomains are covered.
- ⌨️ DNS Servers — enter the IP(s) of the resolver(s) that should answer it (e.g.
10.0.0.25). Keep it to ≤ 8 servers for performance. The client queries all of them and uses the fastest response — even if that response is "no records found", so always specify at least one reliable server. (Leave blank and the client falls back to whatever DNS the device used before WARP started.)
- ⌨️ Add an optional description → Save domain.
LDF is scoped per device profile. A profile with no LDF resource just uses the default suffixes above.
⚠️ Important limitation — no Gateway visibility
DNS queries handled by Local Domain Fallback bypass the Gateway resolver, so they are not subject to Gateway DNS policies and do not appear in DNS logs. If you need filtering or logging on private DNS, use resolver policies instead.
LDF vs. resolver policies — which to use?
|
Local Domain Fallback |
Resolver policies |
| Where it runs |
On the device (client-side) |
In Cloudflare Gateway |
| Use when |
DNS server is reachable only from the device |
DNS server is reachable from Cloudflare's network (via Tunnel, IPsec/GRE, or public Internet) |
| Logging / DNS policy |
❌ No |
✅ Yes (more visibility) |
⭐ Recommendation: if your DNS server can reach a Cloudflare on-ramp, prefer resolver policies for the logging/visibility. If both are configured on the same device, Local Domain Fallback rules apply first.
⚠️ AWS gotcha: don't route all *.amazonaws.com to an internal Route 53 resolver — public AWS endpoints (e.g. ssm.us-east-1.amazonaws.com) won't resolve and features break. Route only specific Route 53 zones or VPC endpoints (vpce.amazonaws.com).
Verify
- 👉 On a device, run
warp-cli settings and check the fallback domains section to confirm your entries are applied.
Part F — Global device client settings (all devices)
These sit outside profiles and apply org-wide. Find them under Team & Resources → Devices → Device settings (global section):
| Setting |
What it does |
Recommendation |
| Allow admin override codes |
Lets an admin generate a code so a user can temporarily disable the client |
Enable for IT support, share codes carefully |
| Allow users to enable local network exclusion |
Lets users exclude their local network — a workaround when a home network reuses your corporate IP ranges |
Enable only if needed; requires Exclude mode |
| Global / emergency disconnect |
Force-disconnect (or reconnect) all clients during an incident/outage — including via an external on-prem HTTPS signal |
Set up before you need it |
Part G — Verify which profile a device got
Via the dashboard:
- 👉 Team & Resources → Devices → open a device → check its assigned profile.
Via the device (CLI):
warp-cli settings
- 📺 Look for the
Profile ID field — it shows the UUID of the profile currently applied.
✅ Checkpoint: Your test device reports the profile you expect (e.g. the BYOD device shows the BYOD profile, not Default).
Worked examples (copy these patterns)
| Profile (order) |
Match rule |
Key settings |
| 1. Linux servers |
os.name is linux |
Mode: Gateway with WARP · Switch locked · service-token enrolled |
| 2. Finance (strict) |
identity.groups.name is finance |
Mode: Gateway with WARP · short auto-connect · stricter posture required downstream |
| 3. BYOD phones |
os.name in {ios android} |
Mode: Gateway with WARP · Include split tunnel (corporate apps only) |
| 4. Contractors |
identity.groups.name is contractors |
Mode: Device Information Only or Include split tunnel · switch locked |
| 5. Default |
(always last) |
Mode: Gateway with WARP · Exclude split tunnel |
✅ Module 3b complete!
You now have:
- ✅ An understanding of global vs. profile settings and the five client modes
- ✅ One or more custom device profiles with match rules
- ✅ Correct order of precedence (specific profiles above broad ones)
- ✅ Per-profile split tunnels and local domain fallback set as needed
- ✅ A way to verify which profile a device received
Quick troubleshooting
| Problem |
Fix |
| A device got the wrong profile |
Check order of precedence — a broader profile above yours matched first (Part C). Move the specific one up |
| Identity selector never matches |
The device was enrolled with a service token, not IdP login — identity selectors don't apply; use OS/managed-network/service-token selectors (Part B) |
| Can't find Split Tunnels / Local Domain Fallback when creating |
They're editable only after saving the profile — create it, then reopen (Parts D–E) |
| Private app unreachable on a device |
Fix split tunnels: remove 100.64.0.0/10 (Exclude) or add 100.80.0.0/16 + IPv6 (Include) plus your CIDR (Part D) |
| Setting change didn't take effect |
Allow up to 10 minutes to propagate; then reconnect the client |
| Home network breaks when connected |
Enable local network exclusion (global setting; requires Exclude mode) (Part F) |
Publish your first private application and replace VPN access to it.