File tree Expand file tree Collapse file tree 2 files changed +2
-49
lines changed
docs/learning-paths/secure-internet-traffic/build-network-policies
partials/cloudflare-one/gateway/policies Expand file tree Collapse file tree 2 files changed +2
-49
lines changed Original file line number Diff line number Diff line change @@ -419,54 +419,7 @@ resource "cloudflare_zero_trust_gateway_policy" "all_net_no_http_https_internet_
419419
420420Only allow network traffic from known and approved devices.
421421
422- <Tabs syncKey = " dashPlusAPI" >
423-
424- <TabItem label = " Dashboard" >
425-
426422<Render
427423 file = " gateway/policies/dash-plus-api/network/enforce-device-posture"
428424 product = " cloudflare-one"
429425/>
430-
431- </TabItem >
432-
433- <TabItem label = " API" >
434-
435- ``` sh
436- curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /gateway/rules \
437- --header " Content-Type: application/json" \
438- --header " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
439- --data ' {
440- "name": "All-NET-ApplicationAccess-Allow",
441- "description": "Only allow network traffic from known and approved devices",
442- "precedence": 0,
443- "enabled": true,
444- "action": "block",
445- "filters": [
446- "l4"
447- ],
448- "traffic": "any(net.sni.domains[*] == \"internalapp.com\")",
449- "device_posture": "not(any(device_posture.checks.passed[*] in {\"<DEVICE_SERIAL_NUMBER_LIST_UUID>\"}))"
450- }'
451- ```
452-
453- </TabItem >
454-
455- <TabItem label = " Terraform" >
456-
457- ``` tf
458- resource "cloudflare_zero_trust_gateway_policy" "all_net_no_http_https_internet_deny" {
459- account_id = var.account_id
460- name = "All-NET-ApplicationAccess-Allow"
461- description = "Only allow network traffic from known and approved devices"
462- precedence = 0
463- enabled = true
464- action = "block"
465- filters = ["l4"]
466- traffic = "any(net.sni.domains[*] == \"internalapp.com\")"
467- device_posture = "not(any(device_posture.checks.passed[*] in {\"${"$"}{cloudflare_zero_trust_list.device_serial_number_list.id}\"}))"
468- }
469- ```
470-
471- </TabItem >
472- </Tabs >
Original file line number Diff line number Diff line change 44
55| Selector | Operator | Value | Logic | Action |
66| ---------------------------- | -------- | ----------------------- | ----- | ------ |
7- | Passed Device Posture Checks | not in | _ Device serial numbers _ | And | Block |
8- | SNI Domain | is | ` internalapp.com ` | | |
7+ | SNI Domain | is | ` internalapp.com ` | And | Block |
8+ | Passed Device Posture Checks | not in | _ Device serial numbers _ | | |
You can’t perform that action at this time.
0 commit comments