edit firewall rules
See original GitHub issueHello,
I see that there’s the possibility to interact with firewall rules:
How would be the equivalent python wrapper code for:
curl -s --request PUT \
--url https://api.cloudflare.com/client/v4/zones/<zone-id>/firewall/rules \
--header 'Authorization: Bearer <auth-code>' \
--header 'Content-Type: application/json' \
-d '[
{
"id": <rule-id>,
"paused": false,
"description": "carrier",
"action": "block",
"priority": null,
"filter": {
"id": <filter-id>,
"expression": <my-expression>,
"paused": false,
"description": ""
}
}
]'
I was starting with that code but don’t know how to move on:
cf = CloudFlare.CloudFlare(email=<my-email>, key=<my-key>)
waf = cf.zones.firewall.rules.set(<abc>)...
Maybe someone can help me with that? Thanks!
Issue Analytics
- State:
- Created 10 months ago
- Comments:6
Top Results From Across the Web
Create, edit, and delete rules · Cloudflare Firewall Rules docs
Select Edit (wrench icon) located on the right of your rule in the rules list to open the Edit firewall rule panel and...
Read more >How to Adjust Windows Firewall Rules Across the Network
1. Log in to the domain controller server. · 2. Go to "Administrative Tools" and click "Windows Firewall with Advanced Security." · 3....
Read more >Create a firewall rule - Deep Security Help Center - Trend Micro
Copy and then modify an existing rule. Right-click the rule in the Firewall Rules list and then click Duplicate. To edit the new...
Read more >Edit Firewall Rule - API Guide - OnApp Documentation
Create own firewall rules; Destroy own firewall rules; Read own firewall rules; Update own firewall rules. To edit a firewall rule, use the...
Read more >Best practices for configuring Windows Defender Firewall
Best practices for configuring Windows Defender Firewall · Keep default settings · Understand rule precedence for inbound rules · Create rules for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks a lot, that did the trick - my expression was faulty.
get WAF rules:
set specific WAF rule:
The
examples
folder now includes https://github.com/cloudflare/python-cloudflare/blob/a8872852966b4ff4674cf3c9682adf209417d48f/examples/example_firewall_rules.py