You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/logs/logpush/logpush-job/enable-destinations/egress-ip.mdx
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,3 +76,67 @@ The following example shows how to set up logpush and Dedicated CDN Egress IPs t
76
76
- Configuration: Select dataset, job name, filters, and fields. Refer to the [Logpush documentation](/logs/logpush/) for more details.
77
77
78
78
2. Check destination to confirm if the logs are received.
79
+
80
+
## 5. Secure your proxy zone endpoint
81
+
82
+
The proxy zone hostname is publicly resolvable, but traffic passes through Cloudflare's edge where you can apply security controls. Use the following best practices to protect your endpoint.
83
+
84
+
### Add a secret header with WAF validation
85
+
86
+
Add a secret token as an HTTP header in your Logpush job, then create a WAF rule to block requests without it. This is the recommended approach for most deployments.
87
+
88
+
**Configure Logpush with a secret header**
89
+
90
+
Any URL parameter starting with `header_` becomes an HTTP header in the request. When creating or updating your Logpush job, add the secret header to your destination URL:
Generate a strong random token using `openssl rand -hex 32`.
97
+
98
+
**Create a WAF custom rule**
99
+
100
+
In the proxy zone, go to **Security** > **WAF** > **Custom rules** and create a rule to block requests without the correct secret header.
101
+
102
+
-**Expression:**
103
+
```txt
104
+
(http.host eq "logpush.yourdestinationendpoint.com" and all(http.request.headers["x-logpush-secret"][*] ne "YOUR_RANDOM_SECRET_TOKEN"))
105
+
```
106
+
-**Action:** Block
107
+
108
+
### Add ASN-based filtering
109
+
110
+
For defense in depth, add a rule to only allow traffic from Cloudflare's ASN. Logpush traffic originates from Cloudflare's network (ASN 13335 or 132892).
111
+
112
+
-**Expression:**
113
+
```txt
114
+
(http.host eq "logpush.yourdestinationendpoint.com" and not ip.geoip.asnum in {13335 132892})
115
+
```
116
+
-**Action:** Block
117
+
118
+
:::note
119
+
ASN filtering alone is insufficient because other Cloudflare customers' traffic also originates from these ASNs. Always combine with secret header validation.
120
+
:::
121
+
122
+
### Use Access Service Tokens for high-security environments
123
+
124
+
For stronger authentication, use [Cloudflare Access Service Tokens](/cloudflare-one/access-controls/service-credentials/service-tokens/) for machine-to-machine authentication. Create a Service Token in the Zero Trust dashboard, then configure Logpush with the Access headers:
Check Cloudflare Analytics for the proxy zone to confirm Logpush traffic is flowing, and monitor WAF events to ensure unauthorized requests are blocked.
0 commit comments