Skip to content

Commit f6ef1e8

Browse files
committed
Add missing network common policy
1 parent e9433b5 commit f6ef1e8

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

src/content/docs/cloudflare-one/policies/gateway/network-policies/common-policies.mdx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,50 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rule \
260260
```
261261

262262
</TabItem> </Tabs>
263+
264+
## Override IP address
265+
266+
Override traffic directed toward a specific IP address with a different IP address.
267+
268+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
269+
270+
| Selector | Operator | Value | Logic | Action |
271+
| ---------------- | -------- | -------------- | ----- | ---------------- |
272+
| Destination IP | in | `203.0.113.17` | And | Network Override |
273+
| Destination Port | is | `80` | | |
274+
275+
| Override IP | Override Port |
276+
| ----------- | ------------- |
277+
| `1.1.1.1` | `80` |
278+
279+
</TabItem>
280+
281+
<TabItem label="API">
282+
283+
```bash
284+
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rule \
285+
--header "Content-Type: application/json" \
286+
--header "Authorization: Bearer <API_TOKEN>" \
287+
--data '{
288+
"name": "Override example.com with 1.1.1.1",
289+
"description": "Override a site's IP address with another IP",
290+
"enabled": true,
291+
"action": "l4_override",
292+
"filters": [
293+
"l4"
294+
],
295+
"traffic": "net.dst.ip in {203.0.113.17} and net.dst.port == 80",
296+
"identity": "",
297+
"device_posture": "",
298+
"rule_settings": {
299+
"l4override": {
300+
"ip": "1.1.1.1",
301+
"port": 80
302+
},
303+
"override_host": "",
304+
"override_ips": null
305+
}
306+
}'
307+
```
308+
309+
</TabItem> </Tabs>

0 commit comments

Comments
 (0)