Cloudflare Zero Trust — Hướng dẫn triển khai & thực hành tốt khi onboarding
Playbook triển khai chi tiết, có quan điểm rõ ràng để triển khai nền tảng Zero Trust (SASE) của Cloudflare cùng Cloudflare WAN. Mỗi phần đưa đường dẫn dashboard chính xác, giá trị cấu hình cụ thể, các lưu ý thực hành tốt, ví dụ chính sách đã làm sẵn, bước kiểm tra, và những sai lầm cần tránh.
|
|
| Đối tượng |
Quản trị viên bảo mật / mạng / IT triển khai Cloudflare One từ đầu đến cuối |
| Phạm vi |
Account → Identity → Devices → ZTNA → Gateway → DLP → AI controls → Cloudflare WAN |
| Bảng điều khiển |
Zero Trust: https://one.dash.cloudflare.com · Account: https://dash.cloudflare.com |
| Gốc tài liệu |
developers.cloudflare.com/cloudflare-one/ · …/cloudflare-wan/ · …/reference-architecture/ |
| Lộ trình học chính |
Replace your VPN …/learning-paths/replace-vpn/ · Holistic AI security …/learning-paths/holistic-ai-security/ |
| Cập nhật lần cuối |
2026-06-08 |
Ghi chú tên gọi: Client trên thiết bị trước đây gọi là WARP client nay là Cloudflare One Client trong tài liệu và dashboard hiện tại. Hướng dẫn này dùng Cloudflare One Client nhưng hành vi giống hệt WARP. Nhãn menu dashboard cũng thay đổi theo thời gian (các khu vực chính sách được nhóm dưới Access controls và Traffic policies); hãy theo mục gần nhất nếu một nhãn đã được di chuyển.
0. Cách dùng hướng dẫn này
Đây là trình tự của một đợt triển khai thực tế. Mỗi giai đoạn phụ thuộc giai đoạn trước, và mỗi giai đoạn được thiết kế để thí điểm trước (5–25 người dùng / một site), kiểm tra, rồi mở rộng.
1 Account/Org → 2 Identity → 3 Devices (Cloudflare One Client)
→ 4 ZTNA (Access) → 5 Gateway (DNS → Network → HTTP → TLS)
→ 6 DLP → 7 AI controls → 8 Cloudflare WAN
10 quy tắc vàng (đọc trước)
- Triển khai dần, không big-bang. Kiến trúc tham chiếu SASE của chính Cloudflare khuyến nghị ưu tiên một hoặc hai use case (thay VPN, rồi SWG) rồi xếp lớp phần còn lại. Hầu hết đợt triển khai thất bại cố bật mọi thứ cùng lúc.
- Thí điểm → kiểm tra → mở rộng ở mọi giai đoạn. Không bao giờ đẩy một chính sách thực thi mới tới toàn bộ người dùng nếu chưa có nhóm thí điểm được giám sát và đường rollback.
- Bắt đầu ở chế độ log/monitor, rồi mới thực thi. Đây là quy tắc đặc biệt với Gateway, DLP và AI controls. Lấy baseline lưu lượng thực trước khi Block.
- Xây thành phần tái sử dụng, không làm snowflake từng ứng dụng. Dùng Access Groups, Lists và reusable posture checks để một thay đổi lan tới mọi nơi. Có quy ước đặt tên từ ngày đầu.
- Danh tính là nền tảng. Kết nối IdP doanh nghiệp với group claims và SCIM trước khi viết bất kỳ chính sách nào tham chiếu nhóm.
- Đặc quyền tối thiểu + xác minh liên tục. Default-deny, thu hẹp phạm vi chính sách, đặt session duration ngắn cho ứng dụng nhạy cảm, và xác minh lại device posture trên mọi request.
- Giữ đường break-glass. Luôn giữ một phương thức đăng nhập quản trị (OTP / Cloudflare login) và một Super Admin không thể bị khóa bởi chính sách của chính bạn.
- Inspect có chủ đích. TLS decryption mở khóa HTTP filtering, DLP và AI prompt inspection — nhưng hãy lên kế hoạch ngoại lệ Do Not Inspect (ứng dụng cert-pinned, Microsoft 365) và cân nhắc phạm vi riêng tư/pháp lý.
- Ghi log mọi thứ về SIEM. Bật Logpush cho Access + Gateway từ đầu; bạn sẽ cần chúng để tinh chỉnh và audit.
- Để ý entitlement. DLP (custom profiles), advanced posture, Browser Isolation ở quy mô lớn, và Cloudflare WAN yêu cầu Enterprise. Xác nhận trước khi xác định phạm vi.
Cloudflare Zero Trust (một phần của nền tảng SASE Cloudflare One) thay thế VPN legacy + stack bảo mật on-prem bằng cách thực thi chính sách theo danh tính và ngữ cảnh tại anycast edge toàn cầu của Cloudflare. Vì mọi dịch vụ chạy ở mọi data center, lưu lượng được kết nối, xác minh, lọc và định tuyến trong một lượt gần người dùng — không backhaul, không độ trễ service-chaining.
Khối xây dựng
| Khả năng |
Sản phẩm |
Vai trò |
| Identity |
IdP integrations + SCIM |
Người dùng là ai, họ thuộc nhóm nào |
| Device connectivity |
Cloudflare One Client (WARP) |
On-ramp mã hóa + tín hiệu device posture |
| ZTNA |
Access |
Truy cập theo từng ứng dụng, nhận biết danh tính (thay VPN) |
| SWG |
Gateway |
Lọc DNS / network (L4) / HTTP (L7) |
| Data protection |
DLP |
Phát hiện & kiểm soát dữ liệu nhạy cảm trong lưu lượng HTTP |
| AI safety |
AI controls / DLP for AI / AI Security for Apps |
Quản trị việc dùng GenAI và bảo vệ prompt/dữ liệu |
| Private connectivity |
Cloudflare Tunnel (cloudflared) / WARP Connector / Mesh |
Phơi bày ứng dụng/mạng nội bộ mà không mở lỗ inbound trên firewall |
| Network on-ramp |
Cloudflare WAN |
Kết nối toàn bộ site, DC và cloud tới Cloudflare |
Cách lưu lượng tới Cloudflare (on-ramp) — chọn theo use case
| On-ramp |
Dùng cho |
Ghi chú / thực hành tốt |
| Cloudflare One Client (WARP) |
Laptop/mobile được quản lý & BYOD |
On-ramp chuẩn cho người dùng; cũng là nguồn device posture |
Cloudflare Tunnel (cloudflared) |
Ứng dụng web nội bộ, SSH/RDP, CIDR riêng |
Chỉ outbound; khuyến nghị hơn origin hướng ra internet. Chỉ cloudflared proxy public hostnames tới ứng dụng nội bộ |
| WARP Connector / Mesh |
Site-to-site / mesh từ một host Linux |
On-ramp phần mềm; hai chiều |
| Cloudflare WAN (GRE/IPsec/Connector/CNI) |
Văn phòng chi nhánh, data center, VPC cloud |
On-ramp mạng Enterprise; định tuyến toàn bộ mạng |
| Clientless (Browser Isolation) |
Thiết bị không quản lý/bên thứ ba, không cài đặt |
Không agent; chỉ có user identity (không có device posture) |
Kiến trúc tham chiếu (logic)
Managed device ─Client─┐
BYOD (Include split) ──┤ ┌──────────────────────────────────────────────┐
Unmanaged (clientless)─┤ │ CLOUDFLARE GLOBAL EDGE │ Internet
Branch/DC ─Cloudflare WAN───┼──────► │ Identity ▸ Posture ▸ Access(ZTNA) │ ─── & SaaS
Cloud VPC ─MNC/IPsec───┘ │ ▸ Gateway(DNS/L4/HTTP) ▸ DLP ▸ AI controls│ ──►
└───────────────┬──────────────────────────────┘
│ Cloudflare Tunnel / Access
▼
Private apps, servers, internal networks
Các quyết định mô hình triển khai cần chốt ngay từ đầu
- Thiết bị managed vs. BYOD → quyết định chế độ WARP split-tunnel (Exclude cho thiết bị quản lý, Include cho thiết bị cá nhân) và việc bạn có thể yêu cầu posture mạnh hay không.
- Client vs. clientless → clientless (Browser Isolation) không có device posture; dành cho nhà thầu/bên thứ ba.
- Bảo mật internet trước (SWG/DLP) vs. truy cập nội bộ trước (ZTNA) → hầu hết tổ chức bắt đầu bằng thay VPN (ZTNA), rồi thêm SWG/DLP. Hãy chọn rõ use case giai đoạn 1.
Điều kiện tiên quyết
- Một Cloudflare account. Zone đã đăng ký không bắt buộc để bắt đầu, nhưng hữu ích cho ứng dụng Access self-hosted và custom hostname.
- Nhận biết gói: Free / Pay-as-you-go / Enterprise. Enterprise là bắt buộc cho DLP custom profiles, advanced posture providers, và Cloudflare WAN.
- Vai trò admin: Super Administrator (hoặc vai trò Zero Trust đã scoped) để thiết lập.
- Với HTTP filtering / TLS inspection / DLP / AI prompt inspection: cài Cloudflare root CA trên thiết bị và chạy client ở chế độ Gateway with WARP.
2. Tạo tài khoản & thiết lập tổ chức
Mục tiêu: Tạo tài khoản, kích hoạt Zero Trust, và chốt team name của tổ chức.
Các bước
- Tạo / đăng nhập tại
https://dash.cloudflare.com; xác minh email tài khoản và bật MFA cấp tài khoản cho admin.
- Mở Zero Trust (left nav → Zero Trust, hoặc
https://one.dash.cloudflare.com). Chọn gói và thêm thanh toán. (Bắt đầu Free/PAYG để đánh giá; đăng ký Enterprise trước khi làm DLP/Cloudflare WAN.)
- Chọn team name. Đây trở thành team domain:
https://<team-name>.cloudflareaccess.com — URL cho App Launcher, đăng nhập Access, và đăng ký client. Đặt/xác minh dưới Settings → Custom Pages / General → Team name.
- Đặt mặc định tổ chức sớm:
- Login methods / IdPs → §3.
- Custom Pages — gắn thương hiệu trang đăng nhập + trang chặn (tạo niềm tin cho người dùng, giảm ticket helpdesk).
- Account roles — gán vai trò admin theo đặc quyền tối thiểu; giữ ≥2 Super Admins.
- Logpush — nối log Access + Gateway tới SIEM/kho lưu trữ ngay bây giờ, đừng để sau.
- Đi qua các luồng Get Started / setup — walkthrough có hướng dẫn ánh xạ tới hướng dẫn này (Replace your VPN, Secure web traffic, Secure DNS for networks, Clientless SSH/RDP, Network-to-network).
Thực hành tốt — team name là mãi mãi. Nó được nhúng vào URL người dùng thấy, cấu hình đăng ký, và chính sách. Chọn giá trị ổn định, dễ nhận (thường là tên viết tắt công ty). Đổi tên sau này làm hỏng bookmark, cấu hình MDM, và trí nhớ thao tác.
Kiểm tra: https://<team-name>.cloudflareaccess.com hiện trang đăng nhập tổ chức; Settings → General hiện đúng gói + team name.
Cạm bẫy: team name dùng tạm; provision DLP/Isolation trước khi entitlement Enterprise có hiệu lực (selector vẫn xám); chỉ một Super Admin (nguy cơ bị khóa).
3. Tích hợp nhà cung cấp danh tính (IdP)
Mục tiêu: Xác thực người dùng bằng danh tính doanh nghiệp để mọi chính sách Access và Gateway đánh giá được ai là người dùng và họ thuộc nhóm nào. Danh tính là nền tảng quan trọng nhất — làm đúng trước khi viết chính sách.
Mặc định đã đổi (tháng 5/2026): Cloudflare hiện là IdP mặc định cho các tài khoản Zero Trust mới tạo, thay One-time PIN. Người dùng có thể đăng nhập bằng tài khoản Cloudflare hiện có (có MFA). Với mọi triển khai production bạn vẫn nên kết nối IdP doanh nghiệp để kế thừa người dùng, nhóm và vòng đời thực.
Phương thức đăng nhập được hỗ trợ
- Enterprise SAML / OIDC: Microsoft Entra ID (Azure AD), Okta, Google Workspace, Ping, OneLogin, JumpCloud, ADFS, Centrify, SAML/OIDC generic.
- Consumer / social: Google, GitHub, LinkedIn, Facebook (use case B2B / đối tác).
- Fallback tích hợp sẵn: Cloudflare login (thành viên tài khoản) và One-time PIN (OTP) cho nhà thầu/người ngoài.
Các bước
- Settings → Authentication → Login methods → Add new → chọn nhà cung cấp.
- Hoàn tất đăng ký ứng dụng phía provider:
- OIDC: sao chép Client ID / Secret vào Cloudflare.
- SAML: trao đổi SSO URL + signing certificate / metadata.
- Enable group/role claims (Entra ID "groups", Okta "groups", Google "Groups"). Cấp quyền đọc directory mà Cloudflare yêu cầu.
- Test bằng nút Test tích hợp — nó chạy một lần đăng nhập thật và hiện identity payload (email, groups, claims) mà Cloudflare nhận. Xác nhận groups xuất hiện ở đây trước khi đi tiếp.
- (Khuyến nghị) Cấu hình SCIM (Entra ID / Okta) để thay đổi user/group và deprovisioning tự lan — và quan trọng hơn, có thể thu hồi session đang hoạt động khi người dùng bị vô hiệu hóa.
- (Tùy chọn) Thêm nhiều IdP — vd. Entra ID cho nhân viên + OTP cho nhà thầu. Bạn có thể scoped IdP nào áp dụng cho ứng dụng nào sau.
MFA độc lập / toàn cục
Zero Trust → Access controls → Access settings:
- Allow MFA methods, đặt Authentication duration, tùy chọn Use identity provider MFA (tôn trọng claim
amr của IdP để tránh hỏi hai lần), và Apply global MFA settings by default. (App Launcher được miễn để người dùng tự đăng ký authenticator.)
Thực hành tốt — danh tính
- SCIM không phải tùy chọn với triển khai thật. Chính sách theo nhóm bị lệch và offboarding thất bại nếu không có. SCIM cũng cho phép thu hồi session khi vô hiệu hóa.
- Xác minh group claims trong output Test — thiếu groups là lý do số 1 khiến "chính sách nhóm của tôi không khớp."
- Giữ một IdP break-glass (OTP hoặc Cloudflare login gắn với admin) để một SAML connector cấu hình sai không khóa bạn ra ngoài.
- Ưu tiên IdP doanh nghiệp hơn consumer cho nhân viên; dành social/OTP cho cộng tác viên bên ngoài và scoped theo từng ứng dụng.
Kiểm tra: IdP Test trả về email + groups mong đợi; một người dùng thí điểm đăng nhập tại team domain qua IdP doanh nghiệp; vô hiệu hóa một user thử trong IdP thu hồi truy cập (chứng minh SCIM).
Cạm bẫy: thiếu group claims; không SCIM (nhóm cũ, offboarding thất bại); không có đăng nhập break-glass; gỡ OTP trước khi SAML được chứng minh.
4. Đăng ký thiết bị — Cloudflare One Client (WARP)
Mục tiêu: Kết nối thiết bị được quản lý (và BYOD được chọn) tới Cloudflare để lưu lượng được lọc (Gateway), tunnel tới ứng dụng nội bộ (Access), và đánh giá device posture.
4.1 Khái niệm chính
- Client modes: Gateway with WARP (lọc L3/L7 + DNS đầy đủ — chế độ enterprise chuẩn), Gateway with DoH (chỉ DNS), Secure Web Gateway without DNS filtering, Proxy mode, và Device Information Only (posture, không proxy).
- Device enrollment permissions: quy tắc xác định ai/cái gì được đăng ký thiết bị (vd. email kết thúc
@yourco.com, xác thực bởi IdP của bạn). Không có quy tắc khớp → "you are not allowed to enroll."
- Device profiles: thiết lập theo nhóm (mode, split tunnels, switch locks, hành vi captive-portal). Khớp bằng selector để các nhóm thiết bị khác nhau nhận cấu hình khác nhau.
- Device posture: tín hiệu dùng trong chính sách Access/Gateway — phiên bản OS, mã hóa đĩa, firewall, client certificate, danh sách serial-number, cộng EDR bên thứ ba.
4.2 Các bước
-
Định nghĩa enrollment permissions. Settings → WARP Client → Device enrollment permissions → Manage → thêm quy tắc, vd. Include → Emails ending in → @yourco.com, và chọn IdP(s). Đây là cổng cho đăng ký.
-
Cấu hình device profiles. Settings → WARP Client → Device settings:
- Đặt default profile (mode = Gateway with WARP, allowed protocols, switch locks, auto-connect, captive-portal detection).
- Thêm group-scoped profiles (vd. servers vs. laptops vs. BYOD) được chọn theo posture/identity.
-
Cấu hình Split Tunnels (theo từng profile):
- Exclude mode (mặc định, thiết bị quản lý): mọi thứ đi qua WARP trừ các ngoại lệ được liệt kê. Danh sách mặc định gồm
100.64.0.0/10 (CGNAT dùng bởi dịch vụ Cloudflare One). Thực hành tốt: thêm lại mọi dải RFC-1918 / CGNAT bạn thực sự dùng local để tránh xung đột, nhưng ngoài ra hãy giữ tunnel rộng.
- Include mode (BYOD/thiết bị cá nhân): chỉ IP/domain được liệt kê đi qua WARP — nên Gateway chỉ inspect lưu lượng công ty và lưu lượng cá nhân vẫn riêng tư. Đây là posture khuyến nghị cho BYOD và giảm lo ngại về riêng tư.
-
Phân phối Cloudflare root CA (bắt buộc cho HTTP filtering, TLS decryption, DLP, AI prompt inspection). Đẩy chứng chỉ do Cloudflare quản lý (hoặc của bạn) tới trust store OS/trình duyệt qua MDM.
-
Triển khai client:
- Thí điểm (thủ công): tải từ trang downloads Cloudflare One; người dùng Login with Cloudflare Zero Trust và nhập team name.
- Production (MDM — Intune, Jamf, Kandji, Workspace ONE, SCCM): đẩy với tham số đã đặt sẵn cho cài đặt im lặng, đã xác thực trước. Tham số MDM chính:
| Tham số |
Mục đích / giá trị thực hành tốt |
organization |
Team name của bạn — bắt buộc cho managed enrollment |
auth_client_id + auth_client_secret |
Service-token enrollment — đăng ký không cần login tương tác (lý tưởng cho fleet/server) |
service_mode |
warp (Gateway with WARP) cho enterprise chuẩn |
onboarding |
false → ẩn màn hình chào cho triển khai im lặng |
auto_connect |
0 để kết nối ngay (không idle timeout trước khi kết nối) |
display_name / support_url |
Thương hiệu + liên kết helpdesk người dùng thấy trong client |
unique_client_id |
Định danh thiết bị ổn định cho ánh xạ posture/serial |
enable_post_quantum |
Bật crypto tunnel post-quantum khi được hỗ trợ |
organization_configs / configs[] |
Chuyển multi-org / config (client mới hơn) |
-
Bật device posture checks. Settings → WARP Client → Device posture (hoặc Reusable components → Posture checks). Posture gồm ba nhóm:
- Client checks (chạy bởi Cloudflare One Client): phiên bản OS, mã hóa đĩa, firewall, client certificate, sự hiện diện file/registry/application, danh sách serial-number, domain-joined.
- Service-to-service (nhà cung cấp bên thứ ba): CrowdStrike, SentinelOne, Microsoft Intune, Tanium, v.v. — khớp cả trên thiết bị không agent qua ánh xạ email.
- Access integrations (chỉ ứng dụng Access, không dùng được trong chính sách Gateway).
Thực hành tốt — thiết bị
- Mặc định Exclude mode cho thiết bị quản lý, Include mode cho BYOD. Đừng chạy thiết bị cá nhân ở full-tunnel Exclude mode — nó bắt lưu lượng cá nhân và tạo rủi ro riêng tư/pháp lý.
- Triển khai root CA trước khi bật TLS decryption. Nếu bạn bật decryption trước, HTTPS gãy trên toàn fleet.
- Dùng service-token (
auth_client_id/secret) enrollment cho server và fleet lớn để thiết bị đăng ký im lặng và nhất quán.
- Đặt posture thành "latest stable" chứ không "absolute latest." vd. macOS ≥ 15.1 (một phiên bản bạn đã qualify), để một bản OS ra cùng ngày không khóa mọi người.
- Tanium posture không được hỗ trợ trong chính sách Gateway — chỉ trong Access. Lên kế hoạch tương ứng.
- Phân giai đoạn device profiles: bắt đầu Device Information Only (posture, không proxy) để xác thực tín hiệu, rồi chuyển nhóm thí điểm sang Gateway with WARP.
Kiểm tra: thiết bị thí điểm hiện Connected, đúng profile được áp dụng; đăng ký xuất hiện dưới My Team → Devices; một posture check (vd. mã hóa đĩa) báo đúng; WARP diagnostics xác nhận enrollment.
Cạm bẫy: quên root CA (HTTPS gãy / DLP im lặng mù); mục Include-mode quá rộng blackhole lưu lượng local khi chuyển Wi-Fi↔Ethernet; không có quy tắc enrollment-permission.
5. ZTNA — Access (ứng dụng & chính sách)
Mục tiêu: Thay VPN cho truy cập ứng dụng. Xuất bản ứng dụng nội bộ và SaaS sau Access để mọi request được xác thực và ủy quyền theo từng ứng dụng — đặc quyền tối thiểu, không tin cậy mạng ngầm.
5.1 Kết nối ứng dụng tới Cloudflare (chọn connector)
- Cloudflare Tunnel (khuyến nghị cho ứng dụng nội bộ): cài
cloudflared trên host tới được ứng dụng → Networks → Tunnels → Create → ánh xạ public hostname (wiki.yourco.com → http://localhost:3000) hoặc định tuyến một private CIDR. Không mở cổng inbound trên firewall. (Chỉ cloudflared có thể proxy public hostname tới origin nội bộ.)
- Ứng dụng SaaS: tích hợp qua SAML/OIDC — Access trở thành lớp danh tính phía trước ứng dụng SaaS.
- Mạng / hạ tầng nội bộ: định tuyến CIDR nội bộ qua tunnel; dùng Access for Infrastructure cho SSH/RDP/VNC, tùy chọn clientless (render trên trình duyệt).
5.2 Thêm một Access application
- Zero Trust → Access → Applications → Add an application.
- Type: Self-hosted (ứng dụng web), SaaS, Private Network, hoặc Infrastructure.
- Với Self-hosted: đặt name, public hostname/path, các IdPs được phép, session duration, App Launcher visibility, thiết lập CORS/cookie.
5.3 Viết chính sách Access (lõi của ZTNA)
Chính sách đánh giá từ trên xuống; khớp đầu tiên thắng. Mỗi chính sách = một Action + rules.
- Actions: Allow · Block · Bypass (không auth — tránh với ứng dụng nhạy cảm) · Service Auth (máy-với-máy qua mTLS hoặc service tokens, không trang đăng nhập).
- Rule types: Include (khớp ≥1), Require (khớp tất cả), Exclude (phải KHÔNG khớp — Exclude ghi đè mọi thứ).
- Selectors: emails / email domains, IdP groups, country, IP/CIDR, device posture,
gateway (đi qua Gateway), mTLS cert, Lists, auth method/MFA, Cloudflare Account Member.
Ví dụ đã làm sẵn — "Allow Engineering trên thiết bị tuân thủ, yêu cầu MFA":
| Rule |
Selector |
Operator |
Value |
| Include |
IdP group |
in |
Engineering |
| Require |
Device posture |
in |
Disk encryption, Firewall on |
| Require |
Authentication method |
in |
MFA |
| Exclude |
Email |
in |
List: Offboarding |
5.4 Khối xây dựng tái sử dụng (làm thế này, không viết rule từng ứng dụng)
- Access Groups (Access controls → Policies → Groups): khối rule có tên, tái sử dụng được (vd. "Secure employees" = thành viên nhóm + 3 posture checks). Tham chiếu cùng nhóm trên nhiều ứng dụng — đổi một lần, áp dụng mọi nơi.
- Lists (Reusable components → Lists): nhập emails (nhà thầu, người dùng rủi ro cao) hoặc serial number thiết bị đã duyệt; cập nhật qua UI hoặc API để tích hợp với hệ thống HR/MDM.
- Reusable posture checks: định nghĩa một lần, tham chiếu trong cả Access và Gateway.
5.5 Mẫu nâng cao
- RBI fallback cho thiết bị không quản lý: giữ Access Allow bình thường cho nhân viên tuân thủ, và thêm chính sách Gateway HTTP Isolate để người dùng vào cùng URL ứng dụng từ thiết bị không tuân thủ nhận phiên remote-browser thay vì bị chặn.
- App Launcher: cổng duy nhất (
<team-name>.cloudflareaccess.com) liệt kê các ứng dụng mà từng người dùng được phép.
- MFA theo ứng dụng / session ngắn: ghi đè MFA toàn cục và đặt hết hạn session immediate cho ứng dụng crown-jewel.
Thực hành tốt — ZTNA
- Áp dụng quy ước đặt tên chính sách từ ngày đầu (vd.
Allow — Full-time employees, Block — High-risk users). Bạn sẽ tái sử dụng các tên này trên hàng chục ứng dụng; nhất quán làm audit trở nên đơn giản.
- Default-deny. Kết thúc danh sách chính sách mỗi ứng dụng bằng lưới an toàn ưu tiên thấp Block — everyone; đặt chính sách Exclude/Block phía trên Allow rộng (thứ tự quan trọng).
- Session duration = đặc quyền tối thiểu theo thời gian. 24h là điển hình; đặt immediate/short cho ứng dụng nhạy cảm để posture + identity được xác minh lại liên tục.
- Dùng
Require gateway để buộc lưu lượng đi qua Gateway (qua client, Browser Isolation, hoặc một site Cloudflare WAN) — linh hoạt hơn chỉ yêu cầu agent, và đảm bảo ghi log/lọc.
- Dùng Service Auth (tokens/mTLS) cho automation/API — không bao giờ dùng chính sách Bypass.
- Di chuyển ứng dụng VPN từng ứng dụng một, kiểm tra, rồi gỡ VPN concentrator (xem lộ trình học Replace your VPN).
Kiểm tra: người dùng được phép tới được ứng dụng sau khi đăng nhập IdP; người không thuộc nhóm bị chặn; Access → Logs / Logpush hiện allow/block kèm ngữ cảnh identity + posture.
Cạm bẫy: Bypass trên ứng dụng nhạy cảm; Allow rộng đặt trên một Block cần thiết; quên default-deny; sprawl rule từng ứng dụng thay vì Access Groups.
6. Secure Web Gateway (Gateway)
Mục tiêu: Inspect và lọc lưu lượng DNS, network (L4) và HTTP (L7) chiều ra — chặn mối đe dọa, thực thi acceptable-use, và tạo điểm thực thi mà DLP và AI controls cắm vào. Xây chính sách theo ba lớp, theo thứ tự này (dashboard: Gateway → Firewall Policies, ngày càng nằm dưới Traffic policies).
6.1 Chính sách DNS — bắt đầu ở đây (giá trị nhanh nhất, rủi ro thấp nhất)
- Gateway → Firewall Policies → DNS → Add a policy.
- Chặn theo security categories (malware, phishing, C2, DGA, new domains) và content categories theo chính sách acceptable-use của bạn.
- DNS Locations (Gateway → DNS Locations): với văn phòng/mạng không có client, tạo một location và trỏ resolver tới endpoint IPv4/IPv6, DoH, hoặc DoT được gán — lọc mọi DNS từ site đó mà không cài client.
Thực hành tốt: Triển khai DNS filtering toàn tổ chức trước — nó hoạt động có hoặc không có client, không làm gãy HTTPS, và ngay lập tức chặn phần lớn malware/phishing theo domain. Đây là thực thi giai đoạn 1 an toàn nhất.
6.2 Chính sách Network (L4)
Gateway → Firewall Policies → Network. Kiểm soát theo IP, port, protocol và application — vd. chặn SMTP outbound từ client, hạn chế egress RDP/SSH, hoặc allow-list đích cụ thể. Cần client ở proxy mode (hoặc on-ramp Cloudflare WAN).
6.3 TLS decryption + chính sách HTTP (L7)
- Bật TLS decryption (Settings → Network → Firewall / TLS decryption). Yêu cầu Cloudflare root CA trên thiết bị (§4). Không có nó, HTTP/DLP/AI inspection không thấy body HTTPS.
- Tạo ngoại lệ Do Not Inspect trước khi thực thi rộng:
- Gateway duy trì sẵn loại ứng dụng "Do Not Inspect" cho ứng dụng không tương thích decryption — chọn cả loại trong chính sách Do Not Inspect và Cloudflare sẽ cập nhật.
- Bật tích hợp lưu lượng Microsoft 365 one-click để tự bypass mọi domain/IP M365.
- Một số sản phẩm Google dùng chứng chỉ nhúng và cần rule Do Not Inspect (hoặc cấu hình ứng dụng tin Cloudflare cert để giữ visibility).
- Thêm ứng dụng certificate-pinned (ngân hàng, một số ứng dụng native/mobile) vào Do Not Inspect.
- Gateway → Firewall Policies → HTTP → Add a policy. Lọc theo application / app type (danh mục ứng dụng chi tiết), domain, URL, content category, file type, chiều request/response, DLP Profile, và selector identity/device.
- Actions: Allow, Block, Isolate (Browser Isolation), Do Not Inspect, Do Not Scan (bỏ DLP trên ứng dụng tin cậy).
- Application granular controls: cho phép một ứng dụng nhưng hạn chế hành động cụ thể — vd. allow ChatGPT nhưng block uploads, allow xem Google Drive nhưng block downloads tới tenant cá nhân. Đây cũng là móc cho AI controls (§7).
Thực hành tốt — Gateway
- Thứ tự: chung → cụ thể, với ngoại lệ Do Not Inspect / Bypass gần phía trên, Allow/Block rộng phía dưới. Chính sách đánh giá từ trên xuống.
- Phân giai đoạn TLS decryption: bật chỉ cho nhóm thí điểm, xác nhận HTTPS hoạt động + log hiện chi tiết đã decrypt, rồi mở rộng. Có danh sách Do Not Inspect sẵn trước.
- Scoped các danh mục nhạy cảm về riêng tư (sức khỏe, tài chính) — cân nhắc Do Not Inspect cho chúng để đáp ứng nghĩa vụ riêng tư/pháp lý.
- Dùng dashboard HTTP analytics để theo dõi tỷ lệ Allowed / Isolated / Do-Not-Inspect và phát hiện cấu hình sai.
Kiểm tra: duyệt một danh mục đã biết bị chặn → block page của Cloudflare; Gateway → Logs hiện quyết định DNS/Network/HTTP và chi tiết HTTPS đã decrypt (chứng minh CA + decryption).
Cạm bẫy: chính sách HTTP/Network không làm gì với người dùng không có client/on-ramp (DNS là ngoại lệ); decryption làm gãy ứng dụng cert-pinned nếu bạn bỏ qua Do Not Inspect; decrypt danh mục nhạy cảm mà không có review riêng tư.
7. Data Loss Prevention (DLP)
Mục tiêu: Phát hiện và kiểm soát dữ liệu nhạy cảm (PII, credentials, tài chính, source code, pattern tùy chỉnh) đi qua lưu lượng Gateway HTTP. Yêu cầu Zero Trust Enterprise + quyền admin, và phụ thuộc TLS decryption (§6.3).
7.1 DLP hoạt động thế nào
- Profiles định nghĩa cái gì cần phát hiện; detection entries là các pattern (detector định sẵn, custom regex, dictionaries, Exact Data Match (EDM), Microsoft Purview (MIP) sensitivity labels). DLP quét HTTP body (uploads/downloads/posts/chat) — không phải headers.
7.2 Các bước
-
Chọn hoặc xây một profile. Zero Trust → DLP → DLP Profiles.
- Predefined profiles: vd. Credentials and Secrets, Financial Information, PII. Bật/tắt từng entry để tinh chỉnh phạm vi. Lưu ý: hầu hết predefined profile khớp khi bất kỳ entry đã bật khớp; profile PII Record đặc biệt — nó yêu cầu ≥3 entry duy nhất ở gần nhau trước khi kích hoạt (kiểm soát false-positive tích hợp).
- Custom profiles: kết hợp entries, thêm custom regex/dictionaries, EDM datasets, hoặc MIP labels.
-
Tinh chỉnh độ nhạy phát hiện:
- Match count — số khớp tối thiểu trước khi một action kích hoạt (đặt
10 → cần 11+ khớp). Giảm nhiễu trên tài liệu có pattern rải rác.
- Confidence threshold (Low / Medium / High) — DLP chấm detection bằng proximity keywords (vd. từ "SSN" gần một số 9 chữ số làm tăng confidence). Ngưỡng cao hơn = ít false positive hơn.
- AI context analysis — mô hình pretrained điều chỉnh confidence từ ngữ cảnh xung quanh (chỉ HTTP/HTTPS). Bật trong DLP settings.
- OCR — phát hiện văn bản nhạy cảm trong ảnh (
.jpg/.png, 4 KB–1 MB). Bật trong DLP settings (OCR cấp profile đang deprecated).
-
Thực thi qua chính sách Gateway HTTP bằng selector DLP Profile. Ví dụ đã làm sẵn:
| Selector |
Operator |
Value |
Logic |
Action |
| Destination Domain |
in |
dropbox.com, wetransfer.com |
And |
Block |
| DLP Profile |
in |
Financial Information (High) |
And |
|
| User Group |
in |
Finance |
|
|
Thực hành tốt — DLP
- Monitor trước, thực thi sau. Bắt đầu mọi profile với chính sách Allow + log để lấy baseline detection 1–2 tuần, rồi thêm Block cho đích/nhóm rủi ro cao cụ thể.
- Mẫu confidence khuyến nghị = hai chính sách HTTP: Chính sách 1 dùng profile Low-confidence với Allow (log) để có visibility; Chính sách 2 dùng profile High-confidence với Block để thực thi. Bạn có telemetry đầy đủ mà không over-block.
- Luôn scoped theo đích, ứng dụng, hoặc nhóm. Một profile Credentials and Secrets rộng áp dụng cho mọi lưu lượng sẽ ngập false positive (Google, Zoho, ứng dụng nội bộ).
- Dùng "Do Not Scan" cho ứng dụng tin cậy, nhiễu; dùng match count + confidence để chỉnh độ chính xác.
- Không decryption = không DLP. Xác nhận TLS decryption + root CA trước khi kỳ vọng detection.
Kiểm tra: upload một pattern thử vô hại (SSN giả / chuỗi thẻ tín dụng thử) tới đích được giám sát → detection xuất hiện trong Gateway → Logs / DLP với profile đã khớp; selector DLP Profile hiện diện (chứng minh Enterprise + quyền).
Cạm bẫy: profile quá rộng; thiếu decryption (under-detection im lặng); thực thi Block trước khi lấy baseline; "DLP Profile selector missing" = gói không phải Enterprise hoặc vai trò không đủ.
8. Kiểm soát an toàn AI
Mục tiêu: Quản trị việc dùng generative AI — phát hiện shadow AI, ngăn dữ liệu nhạy cảm rò vào prompt, và bảo vệ ứng dụng AI bạn xây khỏi mối đe dọa đặc thù LLM. Cloudflare cung cấp các lớp bổ trợ; triển khai theo thứ tự dưới đây.
8.1 Phát hiện shadow AI (visibility trước)
- Gateway → analytics → Shadow IT Discovery: xem ứng dụng AI/SaaS nào người dùng truy cập, đánh dấu approved/unapproved, và định lượng mức dùng. Đây là cơ sở bằng chứng cho chính sách acceptable-use AI của bạn.
8.2 Kiểm soát việc dùng ứng dụng AI bằng Gateway (ngăn rò rỉ)
- Trong một Gateway HTTP policy, nhắm ứng dụng AI (ChatGPT, Google Gemini, Claude, Perplexity, …) và dùng Application granular controls để cho phép ứng dụng nhưng chặn hành động rủi ro (file uploads, gửi prompt) thay vì chặn hẳn.
- Thêm selector DLP Profile vào cùng chính sách để quét prompt/uploads tìm dữ liệu nhạy cảm.
8.3 AI Prompt Protection (DLP cho prompt)
DLP inspect sẵn user prompts tới các ứng dụng AI phổ biến và phân loại chúng:
- Prompt detection cho Google Gemini, ChatGPT, Claude, Perplexity.
- Topic classification: chủ đề Content (PII, Source Code, Credentials & Secrets, Financial Information, Customer Data) và chủ đề Intent (nỗ lực jailbreak, yêu cầu mã độc, nỗ lực trích PII).
- Predefined "AI Prompt" profiles (vd. AI Prompt: AI Security, AI Prompt: PII) gói chúng lại để rollout nhanh. Cấu hình dưới DLP → Detection entries → AI prompt topics, rồi tham chiếu trong chính sách Gateway HTTP.
8.4 DLP for AI Gateway (bảo vệ lưu lượng ứng dụng AI của bạn)
- Nếu bạn chạy AI qua Cloudflare AI Gateway, bật DLP for AI Gateway (AI Gateway → your gateway → features → set up DLP). Nó quét văn bản request tới nhà cung cấp AI và các response tìm dữ liệu nhạy cảm — không yêu cầu Gateway HTTP filtering hay TLS decryption. Lý tưởng cho việc dùng AI theo API / programmatic.
8.5 AI Security for Apps (WAF — cho AI bạn phơi bày)
- Với ứng dụng AI bạn xây và phơi bày, AI Security for Apps (trong WAF) phát hiện mối đe dọa đặc thù LLM — prompt injection, chủ đề không an toàn. Nó bổ trợ DLP: AI Security for Apps xử lý tấn công tầng mô hình; DLP xử lý phát hiện dữ liệu nhạy cảm. Dùng cả hai trên lưu lượng AI.
- Với tổ chức phơi bày server/tool Model Context Protocol (MCP) tới AI agents, Access → AI controls → MCP server portals cho phép bạn xuất bản, cổng kiểm soát, và đổi tên tools/prompts sau chính sách Access.
Rollout AI khuyến nghị: Discover (8.1) → Monitor prompt với AI DLP profiles ở chế độ log (8.3) → Enforce granular controls + DLP block trên ứng dụng được phép (8.2) → thêm DLP for AI Gateway cho AI programmatic (8.4) và AI Security for Apps cho ứng dụng bạn phơi bày (8.5).
Thực hành tốt — đừng hard-block AI. Chặn hẳn đẩy người dùng sang thiết bị/tài khoản cá nhân (shadow AI tệ hơn). Ưu tiên allow + granular control + DLP. Khớp lớp với cách tiêu thụ: prompt inspection (8.2/8.3) cần decryption + client; quản trị API (8.4) thì không.
Cạm bẫy: chặn thay vì quản trị; kỳ vọng prompt inspection mà không có decryption; xem AI Security for Apps và DLP là thay thế lẫn nhau (chúng bổ trợ).
9. Cloudflare WAN
Mục tiêu: Kết nối toàn bộ site, data center và mạng cloud tới mạng Cloudflare như một on-ramp — định tuyến lưu lượng chi nhánh/DC qua Cloudflare cho bảo mật (Magic Firewall + Gateway) và kết nối, không cần MPLS hay VPN full-mesh. Cloudflare WAN là subscription mạng Enterprise. Gốc tài liệu: developers.cloudflare.com/cloudflare-wan/.
9.1 Chọn on-ramp
| On-ramp |
Phù hợp nhất |
Ghi chú |
| Cloudflare WAN Connector (appliance HW/ảo) |
Văn phòng chi nhánh; đơn giản nhất |
Nhẹ/zero-touch; bootstrap qua DHCP hoặc IP tĩnh (serial console) |
| IPsec tunnels |
Router/firewall hiện có |
Theo chuẩn; hỗ trợ BGP |
| GRE tunnels |
Data center / thông lượng cao |
Hỗ trợ BGP |
| CNI / Direct CNI (CNI-P) |
Interconnect riêng, băng thông cao |
Cross-connect vật lý/ảo tới Cloudflare |
| Multi-Cloud Networking (MNC) |
VPC AWS/Azure/GCP |
Tự động hóa tạo on-ramp cloud |
9.2 Pre-flight: MSS clamping (làm trước khi bật Cloudflare WAN)
Cloudflare đóng gói packet (header mới), nên bạn phải đặt TCP MSS clamping trên edge để tránh black-hole packet lớn/HTTPS:
- GRE tunnels: clamp interface GRE nội bộ ở 1,436 bytes.
- IPsec tunnels: clamp tối đa 1,360 bytes (thấp hơn, vì interface vật lý thấy packet đã mã hóa).
- Chi tiết từng vendor khác nhau (Cisco
ip tcp adjust-mss, Juniper tcp-mss); một số thiết bị tự đặt khi tunnel lên — hãy xác minh, đừng giả định.
9.3 Các bước thiết lập
- Xác nhận subscription (làm việc với account team).
- Tạo on-ramp dưới Cloudflare WAN:
- Connector: đăng ký appliance, cắm WAN/LAN, adopt nó (nó tự xây tunnel dư thừa tới Cloudflare). Cấu hình LAN subnet/DHCP.
- IPsec/GRE: thêm tunnel với endpoint thiết bị + địa chỉ interface, pre-shared key (IPsec), và thiết lập tunnel health-check. Nhân bản cấu hình trên router/firewall của bạn.
- Cấu hình routing:
- Static routes — thêm prefix site/DC vào Magic routing table với tunnel làm next hop; đặt priority/weight cho chia tải ECMP và failover.
- BGP (over GRE/IPsec) — thiết lập eBGP (MD5 auth) để trao đổi route động và tự thêm/gỡ subnet kèm phát hiện lỗi.
- Thêm bảo mật: áp dụng rule Magic Firewall (L3/L4), và định tuyến lưu lượng site ra Internet qua Gateway để site không client nhận cùng chính sách DNS/Network/HTTP/DLP như người dùng có client.
- Cấu hình tunnel health checks + alerts (dashboard / GraphQL) để bạn được báo trước khi người dùng cảm thấy outage.
Thực hành tốt — Cloudflare WAN
- Luôn xây dư thừa: hai tunnel từ hai router riêng. Đầu Cloudflare là anycast — một tunnel đã tới mọi data center Cloudflare, nên độ bền là về phía của bạn. Dual router bảo vệ khỏi lỗi phần cứng on-prem.
- Đặt MSS clamping trước. Triệu chứng kinh điển khi bỏ sót clamp:
http:// thường hoạt động nhưng https:// treo. Test bằng curl http://ifconfig.me vs curl https://ifconfig.me.
- Lên kế hoạch không gian IP trước khi thêm route — subnet chồng lấn giữa các site làm gãy Magic routing.
- Ưu tiên BGP cho môi trường đa site/động để thay đổi route không cần sửa tay; dùng static routes cho site đơn giản, ổn định.
- Đừng quên Magic Firewall — lưu lượng mạng không được lọc cho đến khi bạn thêm rule, ngay cả khi lưu lượng client (WARP) đã bị khóa.
- Bật tunnel health alerts và theo dõi băng thông/health qua GraphQL analytics.
Kiểm tra: tunnel/Connector hiện healthy với health check đạt; reachability site-to-site và site-to-private-resource hoạt động; route xuất hiện trong Magic routing table; https://ifconfig.me thành công (MSS đúng); failover hoạt động khi bạn tắt một tunnel; lưu lượng site ra Internet được Gateway lọc.
Cạm bẫy: bỏ sót/sai MSS clamp (HTTPS treo); tunnel một router (không dư thừa thật); subnet chồng lấn; routing bất đối xứng/lệch MTU trên GRE/IPsec; lưu lượng mạng không lọc (không có rule Magic Firewall).
10. Kế hoạch triển khai theo giai đoạn
Thí điểm mỗi giai đoạn với một nhóm/site nhỏ, kiểm tra theo tiêu chí hoàn thành, rồi mở rộng.
| Giai đoạn |
Trọng tâm |
Tiêu chí hoàn thành |
| 0 — Foundation |
Account, gói, team name, vai trò admin + break-glass, IdP + SCIM đã kết nối và test, Logpush đã nối |
IdP Test trả về groups; SCIM deprovision hoạt động; ≥2 Super Admins |
| 1 — Identity + DNS |
DNS filtering toàn tổ chức (DNS Locations), Access trên 1–2 ứng dụng rủi ro thấp qua Tunnel |
Block page hoạt động; người dùng thí điểm tới được ứng dụng Access qua IdP doanh nghiệp |
| 2 — Devices |
Client tới nhóm thí điểm (Info-only → Gateway with WARP), root CA, posture checks, BYOD trên Include split |
Thiết bị thí điểm Connected; posture báo đúng |
| 3 — Gateway L4/L7 |
Chính sách Network + HTTP, TLS decryption phân giai đoạn + Do Not Inspect (M365/cert-pinned), Isolate ứng dụng rủi ro |
HTTPS được decrypt trong log; danh mục AUP bị chặn; không ứng dụng bị gãy |
| 4 — ZTNA expansion |
Di chuyển ứng dụng VPN sang Access + Tunnel từng ứng dụng; default-deny + posture; gỡ VPN |
VPN đã nghỉ cho ứng dụng đã di chuyển; chính sách đặc quyền tối thiểu qua Access Groups |
| 5 — DLP |
DLP monitor mode → Low-confidence Allow/log + High-confidence Block trên luồng rủi ro cao |
Detection đã có baseline; chính sách block đã scoped đang live |
| 6 — AI controls |
Phát hiện shadow-AI → AI prompt DLP (monitor) → thực thi granular; thêm DLP-for-AI-Gateway / AI Security for Apps |
Việc dùng AI hiển thị; chính sách prompt nhạy cảm được thực thi |
| 7 — Cloudflare WAN |
MSS clamp → tunnel dual-router → route (static/BGP) → Magic Firewall → định tuyến tới Gateway; failover đã test |
Tunnel healthy; lưu lượng site được lọc; failover đã xác minh |
Danh sách kiểm tra go-live
- [ ] Team name đã chốt; IdP + SCIM doanh nghiệp đã kết nối, test, group claims đã xác minh
- [ ] Đăng nhập admin break-glass được giữ; ≥2 Super Admins
- [ ] Client triển khai qua MDM (service-token enrollment) với root CA; profile default + group + BYOD đã đặt
- [ ] Posture checks đã bật (OS stable mới nhất) và được tham chiếu qua Access Groups
- [ ] Chính sách DNS → Network → HTTP đang live; TLS decryption đã phân giai đoạn; Do Not Inspect (M365 + cert-pinned) đã cấu hình
- [ ] Ứng dụng Access đã di chuyển với default-deny, posture + MFA, đặt tên nhất quán, nhóm tái sử dụng
- [ ] DLP đã tinh chỉnh (match count + confidence); monitor → enforce; scoped theo đích/nhóm
- [ ] Shadow-AI đã review; AI prompt DLP + granular controls đã thực thi; DLP-for-AI-Gateway khi áp dụng
- [ ] Cloudflare WAN: MSS đã clamp, tunnel dual-router healthy, route đúng, rule Magic Firewall đã áp dụng, failover đã test
- [ ] Logpush tới SIEM đang live; tunnel health + cảnh báo chính sách được chuyển tới đúng admin
11. Kiểm tra, giám sát & khắc phục sự cố
| Khu vực |
Xem ở đâu |
Kiểm tra nhanh |
| Identity |
IdP Test; Access logs |
Login trả về email + groups mong đợi; vô hiệu hóa trong IdP thu hồi (SCIM) |
| Devices |
My Team → Devices; client diagnostics |
Thiết bị Connected, đúng profile được áp dụng |
| Posture |
Trạng thái posture checks |
Tín hiệu (vd. mã hóa đĩa) báo đúng |
| Access |
Access → Logs, Logpush |
Allow/Block kèm ngữ cảnh identity + posture |
| Gateway |
Gateway → Logs / HTTP analytics |
Quyết định DNS/Network/HTTP; HTTPS hiện chi tiết decrypted |
| DLP |
Gateway → Logs / DLP |
Pattern thử kích hoạt đúng profile/confidence |
| AI |
Shadow IT Discovery; Gateway logs |
Ứng dụng AI hiển thị; chính sách prompt kích hoạt |
| Cloudflare WAN |
Dashboard Cloudflare WAN; health checks; GraphQL |
Tunnel healthy; route hiện diện; https://ifconfig.me OK; failover hoạt động |
Thứ tự khắc phục sự cố (nguyên nhân gốc nhanh nhất trước):
- Client đã connected và đúng profile được áp dụng chưa?
- Root CA đã cài chưa (cho HTTPS / DLP / AI prompt inspection)?
- Thứ tự chính sách có đặt Allow rộng trên một Block cần thiết (hoặc thiếu default-deny) không?
- IdP groups có trong identity payload không (chạy lại IdP Test)?
- Tính năng có yêu cầu Enterprise không (DLP custom profiles, advanced posture, Cloudflare WAN)?
- Cloudflare WAN HTTPS treo / truyền lớn thất bại → MSS clamp sai (GRE 1,436 / IPsec 1,360).
- Ứng dụng gãy sau decryption → thêm vào Do Not Inspect (cert pinning / chứng chỉ nhúng).
Xuất log Access + Gateway qua Logpush tới SIEM để tinh chỉnh liên tục, phát hiện bất thường, và audit.
12. Tóm tắt thực hành tốt (tham chiếu một màn hình)
| Lĩnh vực |
Làm thế này |
Tránh |
| Rollout |
Dần dần, có thí điểm, monitor-trước-khi-enforce |
Big-bang; thực thi chính sách chưa test trên toàn fleet |
| Identity |
IdP doanh nghiệp + SCIM + group claims đã xác minh; đăng nhập break-glass |
Chính sách nhóm không có SCIM; không có admin dự phòng |
| Devices |
Exclude (managed) / Include (BYOD); root CA trước; MDM enroll bằng service-token; posture stable mới nhất |
Full-tunnel trên thiết bị cá nhân; decrypt trước CA; posture OS bleeding-edge |
| ZTNA |
Default-deny; Access Groups + Lists; quy ước đặt tên; session ngắn cho ứng dụng nhạy cảm; Require gateway |
Bypass trên ứng dụng nhạy cảm; sprawl rule từng ứng dụng; Allow trên Block |
| Gateway |
DNS trước; phân giai đoạn TLS decryption; Do Not Inspect (M365/cert-pinned) sẵn trước |
Decrypt mọi thứ; bỏ qua ứng dụng cert-pinned |
| DLP |
Monitor → enforce; mẫu hai chính sách Low-Allow/High-Block; scoped chặt; match count + confidence |
Profile rộng trên mọi lưu lượng; Block trước khi lấy baseline; kỳ vọng DLP mà không decryption |
| AI |
Discover → monitor → quản trị bằng granular controls + DLP; DLP-for-AI-Gateway cho API |
Hard-block ứng dụng AI (đẩy shadow AI) |
| Cloudflare WAN |
MSS clamp trước; tunnel dual-router; BGP cho site động; Magic Firewall + định tuyến tới Gateway |
Tunnel một router; subnet chồng lấn; bỏ MSS |
13. Liên kết tham chiếu
- Cloudflare One (Zero Trust) —
https://developers.cloudflare.com/cloudflare-one/
- Replace your VPN (learning path) —
https://developers.cloudflare.com/learning-paths/replace-vpn/
- SASE reference architecture —
https://developers.cloudflare.com/reference-architecture/architectures/sase/
- Designing ZTNA access policies —
https://developers.cloudflare.com/reference-architecture/design-guides/designing-ztna-access-policies/
- Identity providers —
https://developers.cloudflare.com/cloudflare-one/integrations/identity-providers/
- Cloudflare One Client (WARP) & MDM parameters —
https://developers.cloudflare.com/cloudflare-one/team-and-resources/devices/cloudflare-one-client/deployment/mdm-deployment/parameters/
- Split tunnels —
https://developers.cloudflare.com/cloudflare-one/team-and-resources/devices/cloudflare-one-client/configure/route-traffic/split-tunnels/
- Posture checks —
https://developers.cloudflare.com/cloudflare-one/reusable-components/posture-checks/
- Access (ZTNA) controls —
https://developers.cloudflare.com/cloudflare-one/access-controls/
- Access Groups —
https://developers.cloudflare.com/cloudflare-one/access-controls/policies/groups/
- Cloudflare Tunnel —
https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/
- Gateway / Traffic policies —
https://developers.cloudflare.com/cloudflare-one/traffic-policies/
- TLS decryption + Do Not Inspect —
https://developers.cloudflare.com/cloudflare-one/traffic-policies/http-policies/tls-decryption/
- Data Loss Prevention —
https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/
- DLP profile settings (match count / confidence / OCR / AI context) —
https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/dlp-profiles/advanced-settings/
- AI controls —
https://developers.cloudflare.com/cloudflare-one/access-controls/ai-controls/
- DLP for AI Gateway —
https://developers.cloudflare.com/ai-gateway/features/dlp/
- AI Security for Apps (WAF) —
https://developers.cloudflare.com/waf/detections/ai-security-for-apps/
- Holistic AI security (learning path) —
https://developers.cloudflare.com/learning-paths/holistic-ai-security/
- Cloudflare WAN / WAN —
https://developers.cloudflare.com/cloudflare-wan/
- Cloudflare WAN get started + MSS —
https://developers.cloudflare.com/cloudflare-wan/get-started/
- Cloudflare WAN routes (static + BGP) —
https://developers.cloudflare.com/cloudflare-wan/configuration/how-to/configure-routes/
- MTU / MSS reference —
https://developers.cloudflare.com/cloudflare-wan/reference/mtu-mss/
Phụ lục — Thuật ngữ
| Thuật ngữ |
Ý nghĩa |
| Cloudflare One |
Nền tảng SASE của Cloudflare (Zero Trust + dịch vụ mạng) |
| Cloudflare One Client |
Agent trên thiết bị (trước đây là WARP client) |
| Team name / team domain |
Định danh tổ chức <name>.cloudflareaccess.com của bạn |
| ZTNA |
Zero Trust Network Access — truy cập theo ứng dụng, nhận biết danh tính (Access) |
| SWG |
Secure Web Gateway — lọc DNS/network/HTTP (Gateway) |
| Access Group |
Khối rule chính sách tái sử dụng, được tham chiếu trên nhiều ứng dụng |
| Posture |
Tín hiệu bảo mật thiết bị dùng trong chính sách (client / service-to-service / Access integrations) |
| Do Not Inspect |
Action/loại ứng dụng Gateway bỏ qua TLS decryption cho ứng dụng không tương thích |
| DLP confidence |
Điểm Low/Medium/High dựa trên proximity keywords gần một detection |
| Match count |
Số khớp DLP tối thiểu trước khi một action kích hoạt |
| On-ramp |
Cách lưu lượng tới Cloudflare (Client, Tunnel, IPsec/GRE, Connector, CNI, MNC) |
| MSS clamping |
Giới hạn kích thước segment TCP để vừa header tunnel (GRE 1,436 / IPsec 1,360 bytes) |
| Magic routing table |
Routing phía Cloudflare cho Cloudflare WAN/Transit |
| MNC |
Multi-Cloud Networking — on-ramp cloud tự động |
| MCP |
Model Context Protocol — giao diện cho AI agents/tools |
Soạn 2026-06-08. Dựa trên tài liệu Cloudflare hiện hành (Cloudflare One, Cloudflare WAN, và kiến trúc tham chiếu SASE). Xác minh entitlement gói và điều hướng dashboard sống trước khi triển khai production, vì Cloudflare phát hành thay đổi thường xuyên.
Cloudflare Zero Trust — Implementation & Best-Practice Onboarding Guide
A detailed, opinionated implementation playbook for deploying Cloudflare's Zero Trust (SASE) platform plus Cloudflare WAN. Every section gives exact dashboard paths, concrete configuration values, best-practice callouts, worked policy examples, validation steps, and the mistakes to avoid.
|
|
| Audience |
Security / network / IT administrators implementing Cloudflare One end-to-end |
| Scope |
Account → Identity → Devices → ZTNA → Gateway → DLP → AI controls → Cloudflare WAN |
| Dashboards |
Zero Trust: https://one.dash.cloudflare.com · Account: https://dash.cloudflare.com |
| Docs roots |
developers.cloudflare.com/cloudflare-one/ · …/cloudflare-wan/ · …/reference-architecture/ |
| Key learning paths |
Replace your VPN …/learning-paths/replace-vpn/ · Holistic AI security …/learning-paths/holistic-ai-security/ |
| Last reviewed |
2026-06-08 |
Naming note: The device client formerly called the WARP client is now the Cloudflare One Client in current docs and dashboard. This guide uses Cloudflare One Client but the behavior is identical to WARP. Dashboard menu labels also shift over time (policy areas are grouped under Access controls and Traffic policies); follow the nearest equivalent if a label has moved.
0. How to use this guide
This is sequenced as a real rollout. Each phase depends on the one before it, and each is built to be piloted first (5–25 users / one site), validated, then expanded.
1 Account/Org → 2 Identity → 3 Devices (Cloudflare One Client)
→ 4 ZTNA (Access) → 5 Gateway (DNS → Network → HTTP → TLS)
→ 6 DLP → 7 AI controls → 8 Cloudflare WAN
The 10 golden rules (read first)
- Adopt progressively, never big-bang. Cloudflare's own SASE reference architecture recommends prioritizing one or two use cases (VPN replacement, then SWG) and layering the rest. Most failed rollouts try to flip everything at once.
- Pilot → validate → expand at every phase. Never push a new enforcement policy to all users without a monitored pilot group and a rollback path.
- Start in log/monitor mode, then enforce. This is the rule for Gateway, DLP, and AI controls especially. Baseline real traffic before you Block.
- Build reusable components, not per-app snowflakes. Use Access Groups, Lists, and reusable posture checks so one change propagates everywhere. Have a naming convention from day one.
- Identity is the foundation. Connect your corporate IdP with group claims and SCIM before writing any policy that references groups.
- Least privilege + continuous verification. Default-deny, scope policies tightly, set short session durations for sensitive apps, and re-verify device posture on every request.
- Keep a break-glass path. Always retain an admin login method (OTP / Cloudflare login) and a Super Admin who can't be locked out by your own policies.
- Inspect deliberately. TLS decryption unlocks HTTP filtering, DLP, and AI prompt inspection — but plan Do Not Inspect exceptions (cert-pinned apps, Microsoft 365) and consider privacy/legal scope.
- Log everything to your SIEM. Turn on Logpush for Access + Gateway from the start; you'll need it for tuning and audits.
- Mind the entitlements. DLP (custom profiles), advanced posture, Browser Isolation at scale, and Cloudflare WAN require Enterprise. Confirm before scoping.
Cloudflare Zero Trust (part of the Cloudflare One SASE platform) replaces legacy VPN + on-prem security stacks by enforcing identity- and context-aware policy at Cloudflare's global anycast edge. Because every service runs in every data center, traffic is connected, verified, filtered, and routed in a single pass close to the user — no backhaul, no service-chaining latency.
Building blocks
| Capability |
Product |
Role |
| Identity |
IdP integrations + SCIM |
Who the user is, what groups they're in |
| Device connectivity |
Cloudflare One Client (WARP) |
Encrypted on-ramp + device posture signals |
| ZTNA |
Access |
Per-application, identity-aware access (VPN replacement) |
| SWG |
Gateway |
DNS / network (L4) / HTTP (L7) filtering |
| Data protection |
DLP |
Detect & control sensitive data in HTTP traffic |
| AI safety |
AI controls / DLP for AI / AI Security for Apps |
Govern GenAI usage and protect prompts/data |
| Private connectivity |
Cloudflare Tunnel (cloudflared) / WARP Connector / Mesh |
Expose internal apps/networks with no inbound firewall holes |
| Network on-ramp |
Cloudflare WAN |
Connect whole sites, DCs, and cloud to Cloudflare |
How traffic reaches Cloudflare (on-ramps) — choose per use case
| On-ramp |
Use it for |
Notes / best practice |
| Cloudflare One Client (WARP) |
Managed & BYOD laptops/mobiles |
The standard user on-ramp; also the source of device posture |
Cloudflare Tunnel (cloudflared) |
Private web apps, SSH/RDP, private CIDRs |
Outbound-only; recommended over public-facing origins. Only cloudflared proxies public hostnames to private apps |
| WARP Connector / Mesh |
Site-to-site / mesh from a Linux host |
Software on-ramp; bidirectional |
| Cloudflare WAN (GRE/IPsec/Connector/CNI) |
Branch offices, data centers, cloud VPCs |
Enterprise network on-ramp; routes entire networks |
| Clientless (Browser Isolation) |
Unmanaged/3rd-party devices, no install |
Agentless; only user identity is available (no device posture) |
Reference architecture (logical)
Managed device ─Client─┐
BYOD (Include split) ──┤ ┌──────────────────────────────────────────────┐
Unmanaged (clientless)─┤ │ CLOUDFLARE GLOBAL EDGE │ Internet
Branch/DC ─Cloudflare WAN───┼──────► │ Identity ▸ Posture ▸ Access(ZTNA) │ ─── & SaaS
Cloud VPC ─MNC/IPsec───┘ │ ▸ Gateway(DNS/L4/HTTP) ▸ DLP ▸ AI controls│ ──►
└───────────────┬──────────────────────────────┘
│ Cloudflare Tunnel / Access
▼
Private apps, servers, internal networks
Deployment-model decisions to make up front
- Managed vs. BYOD devices → drives WARP split-tunnel mode (Exclude for managed, Include for personal) and whether you can require strong posture.
- Client vs. clientless → clientless (Browser Isolation) gives no device posture; reserve for contractors/3rd parties.
- Internet security first (SWG/DLP) vs. private-access first (ZTNA) → most orgs start with VPN replacement (ZTNA), then add SWG/DLP. Pick your phase-1 use case explicitly.
Prerequisites
- A Cloudflare account. A registered zone is not required to begin, but is useful for self-hosted Access apps and custom hostnames.
- Plan awareness: Free / Pay-as-you-go / Enterprise. Enterprise is required for DLP custom profiles, advanced posture providers, and Cloudflare WAN.
- Admin role: Super Administrator (or scoped Zero Trust roles) for setup.
- For HTTP filtering / TLS inspection / DLP / AI prompt inspection: install the Cloudflare root CA on devices and run the client in Gateway with WARP mode.
2. Account creation & organization setup
Goal: Create the account, activate Zero Trust, and lock in your organization's team name.
Steps
- Create / sign in at
https://dash.cloudflare.com; verify the account email and enable account-level MFA for admins.
- Open Zero Trust (left nav → Zero Trust, or
https://one.dash.cloudflare.com). Choose a plan and add billing. (Start on Free/PAYG to evaluate; subscribe to Enterprise before DLP/Cloudflare WAN work.)
- Choose your team name. This becomes your team domain:
https://<team-name>.cloudflareaccess.com — the URL for the App Launcher, Access logins, and client enrollment. Set/verify under Settings → Custom Pages / General → Team name.
- Set org defaults early:
- Login methods / IdPs → §3.
- Custom Pages — brand the login + block pages (builds user trust, reduces helpdesk tickets).
- Account roles — assign least-privilege admin roles; keep ≥2 Super Admins.
- Logpush — wire Access + Gateway logs to your SIEM/storage now, not later.
- Walk the Get Started / setup flows — guided walkthroughs map to this guide (Replace your VPN, Secure web traffic, Secure DNS for networks, Clientless SSH/RDP, Network-to-network).
Best practice — team name is forever. It's embedded in user-facing URLs, enrollment configs, and policies. Pick a stable, recognizable value (usually your company short name). Renaming later breaks bookmarks, MDM configs, and muscle memory.
Validation: https://<team-name>.cloudflareaccess.com shows your org login; Settings → General shows the right plan + team name.
Pitfalls: throwaway team names; provisioning DLP/Isolation before the Enterprise entitlement is active (selectors stay greyed out); only one Super Admin (lock-out risk).
3. Identity provider (IdP) integration
Goal: Authenticate users with your corporate identity so every Access and Gateway policy can evaluate who the user is and which groups they belong to. Identity is the single most important foundation — get it right before writing policy.
Default changed (May 2026): Cloudflare is now the default IdP for newly created Zero Trust accounts, replacing One-time PIN. Users can sign in with their existing Cloudflare account (MFA-backed). For any production deployment you should still connect your corporate IdP so you inherit real users, groups, and lifecycle.
Supported login methods
- Enterprise SAML / OIDC: Microsoft Entra ID (Azure AD), Okta, Google Workspace, Ping, OneLogin, JumpCloud, ADFS, Centrify, generic SAML/OIDC.
- Consumer / social: Google, GitHub, LinkedIn, Facebook (B2B / partner use cases).
- Built-in fallbacks: Cloudflare login (account membership) and One-time PIN (OTP) for contractors/externals.
Steps
- Settings → Authentication → Login methods → Add new → choose your provider.
- Complete provider app registration:
- OIDC: copy Client ID / Secret into Cloudflare.
- SAML: exchange SSO URL + signing certificate / metadata.
- Enable group/role claims (Entra ID "groups", Okta "groups", Google "Groups"). Grant the directory-read permissions Cloudflare requests.
- Test with the built-in Test button — it runs a real login and shows the identity payload (email, groups, claims) Cloudflare receives. Confirm groups appear here before going further.
- (Recommended) Configure SCIM (Entra ID / Okta) so user/group changes and deprovisioning propagate automatically — and importantly, can revoke active sessions when a user is disabled.
- (Optional) Add multiple IdPs — e.g. Entra ID for employees + OTP for contractors. You can scope which IdPs apply to which apps later.
Independent / global MFA
Zero Trust → Access controls → Access settings:
- Allow MFA methods, set an Authentication duration, optionally Use identity provider MFA (honors the IdP
amr claim to avoid double-prompting), and Apply global MFA settings by default. (The App Launcher is exempt so users can self-enroll authenticators.)
Best practices — identity
- SCIM is not optional for real deployments. Group-based policies drift and offboarding fails without it. SCIM also enables session revocation on disable.
- Verify group claims in the Test output — missing groups is the #1 reason "my group policy doesn't match."
- Keep a break-glass IdP (OTP or Cloudflare login mapped to an admin) so a misconfigured SAML connector can't lock you out.
- Prefer enterprise IdP over consumer for employees; reserve social/OTP for external collaborators and scope them per-app.
Validation: IdP Test returns expected email + groups; a pilot user logs in at the team domain via the corporate IdP; disabling a test user in the IdP revokes access (proves SCIM).
Pitfalls: missing group claims; no SCIM (stale groups, failed offboarding); no break-glass login; decommissioning OTP before SAML is proven.
4. Device enrollment — Cloudflare One Client (WARP)
Goal: Connect managed (and selected BYOD) devices to Cloudflare so traffic can be filtered (Gateway), tunneled to private apps (Access), and evaluated for device posture.
4.1 Key concepts
- Client modes: Gateway with WARP (full L3/L7 + DNS filtering — standard enterprise mode), Gateway with DoH (DNS-only), Secure Web Gateway without DNS filtering, Proxy mode, and Device Information Only (posture, no proxying).
- Device enrollment permissions: rules defining who/what may enroll a device (e.g. emails ending
@yourco.com, authenticated by your IdP). No matching rule → "you are not allowed to enroll."
- Device profiles: per-group settings (mode, split tunnels, switch locks, captive-portal behavior). Matched by selectors so different device groups get different configs.
- Device posture: signals used in Access/Gateway policies — OS version, disk encryption, firewall, client certificate, serial-number list, plus third-party EDR.
4.2 Steps
-
Define enrollment permissions. Settings → WARP Client → Device enrollment permissions → Manage → add a rule, e.g. Include → Emails ending in → @yourco.com, and select the IdP(s). This is the gate for registration.
-
Configure device profiles. Settings → WARP Client → Device settings:
- Set the default profile (mode = Gateway with WARP, allowed protocols, switch locks, auto-connect, captive-portal detection).
- Add group-scoped profiles (e.g. servers vs. laptops vs. BYOD) selected by posture/identity.
-
Configure Split Tunnels (per profile):
- Exclude mode (default, managed devices): everything routes through WARP except listed exceptions. The default list includes
100.64.0.0/10 (CGNAT used by Cloudflare One services). Best practice: add back any RFC-1918 / CGNAT ranges you genuinely use locally to avoid conflicts, but otherwise keep the tunnel broad.
- Include mode (BYOD/personal devices): only listed IPs/domains route through WARP — so Gateway inspects only corporate traffic and personal traffic stays private. This is the recommended posture for BYOD and reduces privacy concerns.
-
Distribute the Cloudflare root CA (required for HTTP filtering, TLS decryption, DLP, AI prompt inspection). Push the Cloudflare-managed certificate (or your own) to the OS/browser trust stores via MDM.
-
Deploy the client:
- Pilot (manual): download from the Cloudflare One downloads page; users Login with Cloudflare Zero Trust and enter the team name.
- Production (MDM — Intune, Jamf, Kandji, Workspace ONE, SCCM): push with pre-set parameters for a silent, pre-authenticated install. Key MDM parameters:
| Parameter |
Purpose / best-practice value |
organization |
Your team name — required for managed enrollment |
auth_client_id + auth_client_secret |
Service-token enrollment — enroll without interactive login (ideal for fleets/servers) |
service_mode |
warp (Gateway with WARP) for standard enterprise |
onboarding |
false → suppress the welcome screens for silent deploys |
auto_connect |
0 to connect immediately (no idle timeout before connect) |
display_name / support_url |
Branding + a helpdesk link users see in the client |
unique_client_id |
Stable device identifier for posture/serial mapping |
enable_post_quantum |
Enable post-quantum tunnel crypto where supported |
organization_configs / configs[] |
Multi-org / config switching (newer clients) |
-
Enable device posture checks. Settings → WARP Client → Device posture (or Reusable components → Posture checks). Posture comes in three categories:
- Client checks (run by the Cloudflare One Client): OS version, disk encryption, firewall, client certificate, file/registry/application presence, serial-number list, domain-joined.
- Service-to-service (third-party providers): CrowdStrike, SentinelOne, Microsoft Intune, Tanium, etc. — matched even on agentless devices via email mapping.
- Access integrations (Access apps only, not usable in Gateway policies).
Best practices — devices
- Default to Exclude mode for managed devices, Include mode for BYOD. Don't run personal devices in full-tunnel Exclude mode — it captures personal traffic and creates privacy/legal exposure.
- Roll out the root CA before enabling TLS decryption. If you flip decryption first, HTTPS breaks fleet-wide.
- Use service-token (
auth_client_id/secret) enrollment for servers and large fleets so devices enroll silently and consistently.
- Set posture to "latest stable" not "absolute latest." e.g. macOS ≥ 15.1 (a version you've qualified), so a same-day OS release doesn't lock everyone out.
- Tanium posture is not supported in Gateway policies — only in Access. Plan accordingly.
- Phase device profiles: start Device Information Only (posture, no proxy) to validate signals, then switch the pilot group to Gateway with WARP.
Validation: pilot device shows Connected, correct profile applied; registration appears under My Team → Devices; a posture check (e.g. disk encryption) reports correctly; WARP diagnostics confirm enrollment.
Pitfalls: forgetting the root CA (HTTPS breaks / DLP silently blind); overly broad Include-mode entries blackholing local traffic when switching Wi-Fi↔Ethernet; no enrollment-permission rule.
5. ZTNA — Access (applications & policies)
Goal: Replace VPN for application access. Publish internal and SaaS apps behind Access so every request is authenticated and authorized per app — least privilege, no implicit network trust.
5.1 Connect the application to Cloudflare (pick a connector)
- Cloudflare Tunnel (recommended for private apps): install
cloudflared on a host that can reach the app → Networks → Tunnels → Create → map a public hostname (wiki.yourco.com → http://localhost:3000) or route a private CIDR. No inbound firewall ports. (Only cloudflared can proxy public hostnames to private origins.)
- SaaS apps: integrate via SAML/OIDC — Access becomes the identity layer in front of the SaaS app.
- Private network / infrastructure: route internal CIDRs through a tunnel; use Access for Infrastructure for SSH/RDP/VNC, optionally clientless (browser-rendered).
5.2 Add an Access application
- Zero Trust → Access → Applications → Add an application.
- Type: Self-hosted (web app), SaaS, Private Network, or Infrastructure.
- For Self-hosted: set name, public hostname/path, the IdPs allowed, session duration, App Launcher visibility, CORS/cookie settings.
5.3 Write Access policies (the core of ZTNA)
Policies evaluate top-down; the first match wins. Each policy = an Action + rules.
- Actions: Allow · Block · Bypass (no auth — avoid for sensitive apps) · Service Auth (machine-to-machine via mTLS or service tokens, no login page).
- Rule types: Include (match ≥1), Require (match all), Exclude (must NOT match — Exclude overrides everything).
- Selectors: emails / email domains, IdP groups, country, IP/CIDR, device posture,
gateway (came through Gateway), mTLS cert, Lists, auth method/MFA, Cloudflare Account Member.
Worked example — "Allow Engineering on a compliant device, require MFA":
| Rule |
Selector |
Operator |
Value |
| Include |
IdP group |
in |
Engineering |
| Require |
Device posture |
in |
Disk encryption, Firewall on |
| Require |
Authentication method |
in |
MFA |
| Exclude |
Email |
in |
List: Offboarding |
5.4 Reusable building blocks (do this, not per-app rules)
- Access Groups (Access controls → Policies → Groups): named, reusable rule blocks (e.g. "Secure employees" = group membership + 3 posture checks). Reference the same group across many apps — change once, applies everywhere.
- Lists (Reusable components → Lists): import emails (contractors, high-risk users) or approved device serial numbers; update via UI or API for integration with HR/MDM systems.
- Reusable posture checks: define once, reference in both Access and Gateway.
5.5 Advanced patterns
- RBI fallback for unmanaged devices: keep the normal Access Allow for compliant employees, and add a Gateway HTTP Isolate policy so users hitting the same app URL from a non-compliant device get a remote-browser session instead of a block.
- App Launcher: single portal (
<team-name>.cloudflareaccess.com) listing each user's permitted apps.
- Per-app MFA / short sessions: override global MFA and set immediate session expiry for crown-jewel apps.
Best practices — ZTNA
- Adopt a policy naming convention from day one (e.g.
Allow — Full-time employees, Block — High-risk users). You'll reuse these names across dozens of apps; consistency makes audits trivial.
- Default-deny. End each app's policy list with a low-priority Block — everyone safety net; put Exclude/Block policies above broad Allows (order matters).
- Session duration = least privilege over time. 24h is typical; set immediate/short for sensitive apps so posture + identity are re-verified continuously.
- Use
Require gateway to force traffic through Gateway (via client, Browser Isolation, or a Cloudflare WAN site) — more flexible than requiring the agent alone, and guarantees logging/filtering.
- Use Service Auth (tokens/mTLS) for automation/APIs — never a Bypass policy.
- Migrate VPN apps app-by-app, validate, then decommission the VPN concentrator (see the Replace your VPN learning path).
Validation: permitted user reaches the app after IdP login; non-member is blocked; Access → Logs / Logpush show allow/block with identity + posture context.
Pitfalls: Bypass on sensitive apps; broad Allow ordered above a needed Block; forgetting the default-deny; per-app rule sprawl instead of Access Groups.
6. Secure Web Gateway (Gateway)
Goal: Inspect and filter outbound DNS, network (L4), and HTTP (L7) traffic — block threats, enforce acceptable-use, and create the enforcement point DLP and AI controls plug into. Build policies in three layers, in this order (dashboard: Gateway → Firewall Policies, increasingly under Traffic policies).
6.1 DNS policies — start here (fastest, lowest-risk value)
- Gateway → Firewall Policies → DNS → Add a policy.
- Block by security categories (malware, phishing, C2, DGA, new domains) and content categories per your acceptable-use policy.
- DNS Locations (Gateway → DNS Locations): for offices/networks without the client, create a location and point the resolver at the assigned IPv4/IPv6, DoH, or DoT endpoints — filtering all DNS from that site with no client install.
Best practice: Deploy DNS filtering org-wide first — it works with or without the client, can't break HTTPS, and immediately blocks the majority of malware/phishing by domain. It's your safest phase-1 enforcement.
6.2 Network policies (L4)
Gateway → Firewall Policies → Network. Control by IP, port, protocol, and application — e.g. block outbound SMTP from clients, restrict RDP/SSH egress, or allow-list specific destinations. Requires the client in proxy mode (or a Cloudflare WAN on-ramp).
6.3 TLS decryption + HTTP policies (L7)
- Enable TLS decryption (Settings → Network → Firewall / TLS decryption). Requires the Cloudflare root CA on devices (§4). Without it, HTTP/DLP/AI inspection can't see HTTPS bodies.
- Create your Do Not Inspect exceptions before broad enforcement:
- Gateway maintains a built-in "Do Not Inspect" application type for apps incompatible with decryption — select the whole type in a Do Not Inspect policy and Cloudflare keeps it updated.
- Turn on the one-click Microsoft 365 traffic integration to auto-bypass all M365 domains/IPs.
- Some Google products use embedded certificates and need a Do Not Inspect rule (or configure the app to trust the Cloudflare cert to keep visibility).
- Add certificate-pinned apps (banking, some native/mobile apps) to Do Not Inspect.
- Gateway → Firewall Policies → HTTP → Add a policy. Filter by application / app type (granular app categories), domain, URL, content category, file type, request/response direction, DLP Profile, and identity/device selectors.
- Actions: Allow, Block, Isolate (Browser Isolation), Do Not Inspect, Do Not Scan (skip DLP on trusted apps).
- Application granular controls: permit an app but restrict specific actions — e.g. allow ChatGPT but block uploads, allow Google Drive viewing but block downloads to personal tenants. This is also the hook for AI controls (§7).
Best practices — Gateway
- Order: general → specific, with Do Not Inspect / Bypass exceptions near the top, broad Allow/Block below. Policies evaluate top-down.
- Stage TLS decryption: enable for the pilot group only, confirm HTTPS works + logs show decrypted detail, then expand. Have the Do Not Inspect list ready first.
- Scope privacy-sensitive categories (health, finance) — consider Do Not Inspect for them to meet privacy/legal obligations.
- Use the HTTP analytics dashboard to watch Allowed / Isolated / Do-Not-Inspect ratios and spot misconfig.
Validation: browse a known-blocked category → Cloudflare block page; Gateway → Logs show DNS/Network/HTTP decisions and decrypted HTTPS detail (proves CA + decryption).
Pitfalls: HTTP/Network policies do nothing for users without the client/on-ramp (DNS is the exception); decryption breaks cert-pinned apps if you skip Do Not Inspect; decrypting sensitive categories without a privacy review.
7. Data Loss Prevention (DLP)
Goal: Detect and control sensitive data (PII, credentials, financial, source code, custom patterns) moving through Gateway HTTP traffic. Requires Zero Trust Enterprise + admin permissions, and depends on TLS decryption (§6.3).
7.1 How DLP works
- Profiles define what to detect; detection entries are the patterns (predefined detectors, custom regex, dictionaries, Exact Data Match (EDM), Microsoft Purview (MIP) sensitivity labels). DLP scans the HTTP body (uploads/downloads/posts/chat) — not headers.
7.2 Steps
-
Pick or build a profile. Zero Trust → DLP → DLP Profiles.
- Predefined profiles: e.g. Credentials and Secrets, Financial Information, PII. Toggle individual entries to tune scope. Note: most predefined profiles match when any enabled entry matches; the PII Record profile is special — it requires ≥3 unique entries in close proximity before it fires (built-in false-positive control).
- Custom profiles: combine entries, add custom regex/dictionaries, EDM datasets, or MIP labels.
-
Tune detection sensitivity:
- Match count — minimum number of matches before an action triggers (set
10 → needs 11+ matches). Cuts noise on documents with isolated patterns.
- Confidence threshold (Low / Medium / High) — DLP scores detections using proximity keywords (e.g. the word "SSN" near a 9-digit number raises confidence). Higher threshold = fewer false positives.
- AI context analysis — a pretrained model adjusts confidence from surrounding context (HTTP/HTTPS only). Enable in DLP settings.
- OCR — detect sensitive text inside images (
.jpg/.png, 4 KB–1 MB). Enable in DLP settings (profile-level OCR is deprecating).
-
Enforce via a Gateway HTTP policy using the DLP Profile selector. Worked example:
| Selector |
Operator |
Value |
Logic |
Action |
| Destination Domain |
in |
dropbox.com, wetransfer.com |
And |
Block |
| DLP Profile |
in |
Financial Information (High) |
And |
|
| User Group |
in |
Finance |
|
|
Best practices — DLP
- Monitor first, enforce second. Start every profile with an Allow + log policy to baseline detections for 1–2 weeks, then add a Block for specific high-risk destinations/groups.
- The recommended confidence pattern = two HTTP policies: Policy 1 uses a Low-confidence profile with Allow (log) for visibility; Policy 2 uses a High-confidence profile with Block for enforcement. You get full telemetry without over-blocking.
- Always scope by destination, app, or group. A broad Credentials and Secrets profile applied to all traffic floods you with false positives (Google, Zoho, internal apps).
- Use "Do Not Scan" for trusted, noisy apps; use match count + confidence to dial in precision.
- No decryption = no DLP. Confirm TLS decryption + root CA before expecting detections.
Validation: upload a benign test pattern (fake SSN / test credit-card string) to a monitored destination → detection appears in Gateway → Logs / DLP with the matched profile; the DLP Profile selector is present (proves Enterprise + permissions).
Pitfalls: over-broad profiles; missing decryption (silent under-detection); enforcing Block before baselining; "DLP Profile selector missing" = non-Enterprise plan or insufficient role.
8. AI safety controls
Goal: Govern generative-AI usage — discover shadow AI, stop sensitive data leaking into prompts, and defend AI apps you build from LLM-specific threats. Cloudflare provides complementary layers; deploy them in the order below.
8.1 Discover shadow AI (visibility first)
- Gateway → analytics → Shadow IT Discovery: see which AI/SaaS apps users access, mark them approved/unapproved, and quantify usage. This is the evidence base for your AI acceptable-use policy.
8.2 Control AI app usage with Gateway (prevent leakage)
- In a Gateway HTTP policy, target AI apps (ChatGPT, Google Gemini, Claude, Perplexity, …) and use Application granular controls to allow the app but block risky actions (file uploads, prompt submission) instead of blocking outright.
- Add the DLP Profile selector to the same policy to scan prompts/uploads for sensitive data.
8.3 AI Prompt Protection (DLP for prompts)
DLP natively inspects user prompts to popular AI apps and classifies them:
- Prompt detection for Google Gemini, ChatGPT, Claude, Perplexity.
- Topic classification: Content topics (PII, Source Code, Credentials & Secrets, Financial Information, Customer Data) and Intent topics (jailbreak attempts, malicious-code requests, PII-extraction attempts).
- Predefined "AI Prompt" profiles (e.g. AI Prompt: AI Security, AI Prompt: PII) bundle these for quick rollout. Configure under DLP → Detection entries → AI prompt topics, then reference in a Gateway HTTP policy.
8.4 DLP for AI Gateway (protect your own AI apps' traffic)
- If you run AI through Cloudflare AI Gateway, enable DLP for AI Gateway (AI Gateway → your gateway → features → set up DLP). It scans the text of requests to AI providers and the responses for sensitive data — without requiring Gateway HTTP filtering or TLS decryption. Ideal for API-based / programmatic AI usage.
8.5 AI Security for Apps (WAF — for AI you expose)
- For AI apps you build and expose, AI Security for Apps (in WAF) detects LLM-specific threats — prompt injection, unsafe topics. It complements DLP: AI Security for Apps handles model-layer attacks; DLP handles sensitive-data detection. Use both on AI traffic.
- For orgs exposing Model Context Protocol (MCP) servers/tools to AI agents, Access → AI controls → MCP server portals lets you publish, gate, and rename tools/prompts behind Access policy.
Recommended AI rollout: Discover (8.1) → Monitor prompts with AI DLP profiles in log mode (8.3) → Enforce granular controls + DLP block on sanctioned apps (8.2) → add DLP for AI Gateway for programmatic AI (8.4) and AI Security for Apps for apps you expose (8.5).
Best practice — don't hard-block AI. Outright blocks push users to personal devices/accounts (worse shadow AI). Prefer allow + granular control + DLP. Match the layer to consumption: prompt inspection (8.2/8.3) needs decryption + client; API governance (8.4) does not.
Pitfalls: blocking instead of governing; expecting prompt inspection without decryption; treating AI Security for Apps and DLP as interchangeable (they're complementary).
9. Cloudflare WAN
Goal: Connect entire sites, data centers, and cloud networks to Cloudflare's network as an on-ramp — routing branch/DC traffic through Cloudflare for security (Magic Firewall + Gateway) and connectivity, without MPLS or full-mesh VPNs. Cloudflare WAN is an Enterprise network subscription. Docs root: developers.cloudflare.com/cloudflare-wan/.
9.1 Choose on-ramp(s)
| On-ramp |
Best for |
Notes |
| Cloudflare WAN Connector (HW/virtual appliance) |
Branch offices; simplest |
Lightweight/zero-touch; bootstrap via DHCP or static IP (serial console) |
| IPsec tunnels |
Existing routers/firewalls |
Standards-based; supports BGP |
| GRE tunnels |
Data centers / high throughput |
Supports BGP |
| CNI / Direct CNI (CNI-P) |
Private, high-bandwidth interconnect |
Physical/virtual cross-connect to Cloudflare |
| Multi-Cloud Networking (MNC) |
AWS/Azure/GCP VPCs |
Automates cloud on-ramp creation |
9.2 Pre-flight: MSS clamping (do this before enabling Cloudflare WAN)
Cloudflare encapsulates packets (new headers), so you must set TCP MSS clamping on your edge to avoid black-holing large/HTTPS packets:
- GRE tunnels: clamp the GRE internal interface to 1,436 bytes.
- IPsec tunnels: clamp to 1,360 bytes maximum (lower, because the physical interface sees encrypted packets).
- Vendor specifics differ (Cisco
ip tcp adjust-mss, Juniper tcp-mss); some devices set it automatically once the tunnel is up — verify, don't assume.
9.3 Setup steps
- Confirm the subscription (engage your account team).
- Create on-ramp(s) under Cloudflare WAN:
- Connector: register the appliance, cable WAN/LAN, adopt it (it auto-builds redundant tunnels to Cloudflare). Configure LAN subnets/DHCP.
- IPsec/GRE: add tunnels with your device's endpoint + interface addresses, (IPsec) pre-shared key, and tunnel health-check settings. Mirror the config on your router/firewall.
- Configure routing:
- Static routes — add your site/DC prefixes to the Magic routing table with the tunnel as next hop; set priority/weight for ECMP load-sharing and failover.
- BGP (over GRE/IPsec) — establish eBGP (MD5 auth) to exchange routes dynamically and auto-add/remove subnets with failure detection.
- Add security: apply Magic Firewall (L3/L4) rules, and route Internet-bound site traffic through Gateway so clientless sites get the same DNS/Network/HTTP/DLP policies as client users.
- Configure tunnel health checks + alerts (dashboard / GraphQL) so you're notified before users feel an outage.
Best practices — Cloudflare WAN
- Always build redundancy: two tunnels from separate routers. The Cloudflare end is anycast — one tunnel already reaches every Cloudflare data center, so resilience is about your side. Dual routers protect against on-prem hardware failure.
- Set MSS clamping first. The classic symptom of a missed clamp: plain
http:// works but https:// hangs. Test with curl http://ifconfig.me vs curl https://ifconfig.me.
- Plan IP space before adding routes — overlapping subnets across sites break Magic routing.
- Prefer BGP for multi-site/dynamic environments so route changes don't require manual edits; use static routes for simple, stable sites.
- Don't forget Magic Firewall — network traffic is unfiltered until you add rules, even when client (WARP) traffic is locked down.
- Enable tunnel health alerts and watch bandwidth/health via GraphQL analytics.
Validation: tunnels/Connector show healthy with passing health checks; site-to-site and site-to-private-resource reachability works; routes appear in the Magic routing table; https://ifconfig.me succeeds (MSS correct); failover works when you disable one tunnel; Internet-bound site traffic is filtered by Gateway.
Pitfalls: missed/incorrect MSS clamp (HTTPS hangs); single-router tunnels (no real redundancy); overlapping subnets; asymmetric routing/MTU mismatches on GRE/IPsec; unfiltered network traffic (no Magic Firewall rules).
10. Phased rollout plan
Pilot each phase with a small group/site, validate against its exit criteria, then expand.
| Phase |
Focus |
Exit criteria |
| 0 — Foundation |
Account, plan, team name, admin roles + break-glass, IdP + SCIM connected and tested, Logpush wired |
IdP Test returns groups; SCIM deprovision works; ≥2 Super Admins |
| 1 — Identity + DNS |
Org-wide DNS filtering (DNS Locations), Access on 1–2 low-risk apps via Tunnel |
Block page works; pilot users reach Access apps via corporate IdP |
| 2 — Devices |
Client to pilot group (Info-only → Gateway with WARP), root CA, posture checks, BYOD on Include split |
Pilot devices Connected; posture reports correctly |
| 3 — Gateway L4/L7 |
Network + HTTP policies, staged TLS decryption + Do Not Inspect (M365/cert-pinned), Isolate risky apps |
HTTPS decrypted in logs; AUP categories blocked; no broken apps |
| 4 — ZTNA expansion |
Migrate VPN apps to Access + Tunnel app-by-app; default-deny + posture; decommission VPN |
VPN retired for migrated apps; least-privilege policies via Access Groups |
| 5 — DLP |
DLP monitor mode → Low-confidence Allow/log + High-confidence Block on high-risk flows |
Detections baselined; scoped block policies live |
| 6 — AI controls |
Shadow-AI discovery → AI prompt DLP (monitor) → granular enforce; add DLP-for-AI-Gateway / AI Security for Apps |
AI usage visible; sensitive-prompt policy enforced |
| 7 — Cloudflare WAN |
MSS clamp → dual-router tunnels → routes (static/BGP) → Magic Firewall → route to Gateway; failover tested |
Tunnels healthy; site traffic filtered; failover verified |
Go-live checklist
- [ ] Team name finalized; corporate IdP + SCIM connected, tested, group claims verified
- [ ] Break-glass admin login retained; ≥2 Super Admins
- [ ] Client deployed via MDM (service-token enrollment) with root CA; default + group + BYOD profiles set
- [ ] Posture checks enabled (latest stable OS) and referenced via Access Groups
- [ ] DNS → Network → HTTP policies live; TLS decryption staged; Do Not Inspect (M365 + cert-pinned) configured
- [ ] Access apps migrated with default-deny, posture + MFA, consistent naming, reusable groups
- [ ] DLP tuned (match count + confidence); monitor → enforce; scoped to destinations/groups
- [ ] Shadow-AI reviewed; AI prompt DLP + granular controls enforced; DLP-for-AI-Gateway where applicable
- [ ] Cloudflare WAN: MSS clamped, dual-router tunnels healthy, routes correct, Magic Firewall rules applied, failover tested
- [ ] Logpush to SIEM live; tunnel health + policy alerts routed to the right admins
11. Validation, monitoring & troubleshooting
| Area |
Where to look |
Quick check |
| Identity |
IdP Test; Access logs |
Login returns expected email + groups; disable in IdP revokes (SCIM) |
| Devices |
My Team → Devices; client diagnostics |
Device Connected, correct profile applied |
| Posture |
Posture checks status |
Signal (e.g. disk encryption) reports correctly |
| Access |
Access → Logs, Logpush |
Allow/Block with identity + posture context |
| Gateway |
Gateway → Logs / HTTP analytics |
DNS/Network/HTTP decisions; HTTPS shows decrypted detail |
| DLP |
Gateway → Logs / DLP |
Test pattern triggers the expected profile/confidence |
| AI |
Shadow IT Discovery; Gateway logs |
AI apps visible; prompt policy fires |
| Cloudflare WAN |
Cloudflare WAN dashboard; health checks; GraphQL |
Tunnels healthy; routes present; https://ifconfig.me OK; failover works |
Troubleshooting order (fastest root-causes first):
- Is the client connected and the right profile applied?
- Is the root CA installed (for HTTPS / DLP / AI prompt inspection)?
- Does policy order put a broad Allow above a needed Block (or a missing default-deny)?
- Are IdP groups present in the identity payload (re-run the IdP Test)?
- Does the feature require Enterprise (DLP custom profiles, advanced posture, Cloudflare WAN)?
- Cloudflare WAN HTTPS hangs / large transfers fail → MSS clamp wrong (GRE 1,436 / IPsec 1,360).
- App broken after decryption → add to Do Not Inspect (cert pinning / embedded certs).
Export Access + Gateway logs via Logpush to your SIEM for ongoing tuning, anomaly detection, and audit.
12. Best-practice summary (one-screen reference)
| Domain |
Do this |
Avoid |
| Rollout |
Progressive, piloted, monitor-before-enforce |
Big-bang; enforcing untested policies fleet-wide |
| Identity |
Corporate IdP + SCIM + verified group claims; break-glass login |
Group policies with no SCIM; no fallback admin |
| Devices |
Exclude (managed) / Include (BYOD); root CA first; service-token MDM enroll; latest stable posture |
Full-tunnel on personal devices; decrypt before CA; bleeding-edge OS posture |
| ZTNA |
Default-deny; Access Groups + Lists; naming convention; short sessions for sensitive apps; Require gateway |
Bypass on sensitive apps; per-app rule sprawl; Allow above Block |
| Gateway |
DNS first; stage TLS decryption; Do Not Inspect (M365/cert-pinned) ready first |
Decrypting everything; ignoring cert-pinned apps |
| DLP |
Monitor → enforce; Low-Allow/High-Block two-policy pattern; scope tightly; match count + confidence |
Broad profiles on all traffic; Block before baselining; expecting DLP without decryption |
| AI |
Discover → monitor → govern with granular controls + DLP; DLP-for-AI-Gateway for APIs |
Hard-blocking AI apps (drives shadow AI) |
| Cloudflare WAN |
MSS clamp first; dual-router tunnels; BGP for dynamic sites; Magic Firewall + route to Gateway |
Single-router tunnels; overlapping subnets; skipping MSS |
13. Reference links
- Cloudflare One (Zero Trust) —
https://developers.cloudflare.com/cloudflare-one/
- Replace your VPN (learning path) —
https://developers.cloudflare.com/learning-paths/replace-vpn/
- SASE reference architecture —
https://developers.cloudflare.com/reference-architecture/architectures/sase/
- Designing ZTNA access policies —
https://developers.cloudflare.com/reference-architecture/design-guides/designing-ztna-access-policies/
- Identity providers —
https://developers.cloudflare.com/cloudflare-one/integrations/identity-providers/
- Cloudflare One Client (WARP) & MDM parameters —
https://developers.cloudflare.com/cloudflare-one/team-and-resources/devices/cloudflare-one-client/deployment/mdm-deployment/parameters/
- Split tunnels —
https://developers.cloudflare.com/cloudflare-one/team-and-resources/devices/cloudflare-one-client/configure/route-traffic/split-tunnels/
- Posture checks —
https://developers.cloudflare.com/cloudflare-one/reusable-components/posture-checks/
- Access (ZTNA) controls —
https://developers.cloudflare.com/cloudflare-one/access-controls/
- Access Groups —
https://developers.cloudflare.com/cloudflare-one/access-controls/policies/groups/
- Cloudflare Tunnel —
https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/
- Gateway / Traffic policies —
https://developers.cloudflare.com/cloudflare-one/traffic-policies/
- TLS decryption + Do Not Inspect —
https://developers.cloudflare.com/cloudflare-one/traffic-policies/http-policies/tls-decryption/
- Data Loss Prevention —
https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/
- DLP profile settings (match count / confidence / OCR / AI context) —
https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/dlp-profiles/advanced-settings/
- AI controls —
https://developers.cloudflare.com/cloudflare-one/access-controls/ai-controls/
- DLP for AI Gateway —
https://developers.cloudflare.com/ai-gateway/features/dlp/
- AI Security for Apps (WAF) —
https://developers.cloudflare.com/waf/detections/ai-security-for-apps/
- Holistic AI security (learning path) —
https://developers.cloudflare.com/learning-paths/holistic-ai-security/
- Cloudflare WAN / WAN —
https://developers.cloudflare.com/cloudflare-wan/
- Cloudflare WAN get started + MSS —
https://developers.cloudflare.com/cloudflare-wan/get-started/
- Cloudflare WAN routes (static + BGP) —
https://developers.cloudflare.com/cloudflare-wan/configuration/how-to/configure-routes/
- MTU / MSS reference —
https://developers.cloudflare.com/cloudflare-wan/reference/mtu-mss/
Appendix — Glossary
| Term |
Meaning |
| Cloudflare One |
Cloudflare's SASE platform (Zero Trust + network services) |
| Cloudflare One Client |
The device agent (formerly WARP client) |
| Team name / team domain |
Your org's <name>.cloudflareaccess.com identifier |
| ZTNA |
Zero Trust Network Access — per-app, identity-aware access (Access) |
| SWG |
Secure Web Gateway — DNS/network/HTTP filtering (Gateway) |
| Access Group |
Reusable block of policy rules referenced across many apps |
| Posture |
Device security signals used in policy (client / service-to-service / Access integrations) |
| Do Not Inspect |
Gateway action/app-type that bypasses TLS decryption for incompatible apps |
| DLP confidence |
Low/Medium/High score based on proximity keywords near a detection |
| Match count |
Minimum number of DLP matches before an action triggers |
| On-ramp |
How traffic reaches Cloudflare (Client, Tunnel, IPsec/GRE, Connector, CNI, MNC) |
| MSS clamping |
TCP segment-size cap to fit tunnel headers (GRE 1,436 / IPsec 1,360 bytes) |
| Magic routing table |
Cloudflare-side routing for Cloudflare WAN/Transit |
| MNC |
Multi-Cloud Networking — automated cloud on-ramps |
| MCP |
Model Context Protocol — interface for AI agents/tools |
Prepared 2026-06-08. Grounded in current Cloudflare documentation (Cloudflare One, Cloudflare WAN, and SASE reference architecture). Verify plan entitlements and live dashboard navigation before production rollout, as Cloudflare ships changes frequently.