Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions action.d/cloudflare-token.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Version 2025/03/01
#
# Author: Logic-32
# Author: Logic-32, NgLoader
#
# IMPORTANT
#
Expand All @@ -11,6 +11,7 @@
# To get your Cloudflare API token: https://developers.cloudflare.com/api/tokens/create/
#
# Cloudflare Firewall API: https://developers.cloudflare.com/firewall/api/cf-firewall-rules/endpoints/
# Cloudflare Access Rules API: https://developers.cloudflare.com/api/resources/firewall/subresources/access_rules/methods/create/

[Definition]

Expand Down Expand Up @@ -62,11 +63,18 @@ actionunban = id=$(curl -s -G -X GET "<_cf_api_url>" \
<_cf_api_prms> \
--data '{"cascade": "none"}'

_cf_api_url = https://api.cloudflare.com/client/v4/zones/<cfzone>/firewall/access_rules/rules
_cf_api_url = https://api.cloudflare.com/client/v4/<cfroute>/<cfzone>/firewall/access_rules/rules
_cf_api_prms = -H "Authorization: Bearer <cftoken>" -H "Content-Type: application/json"

[Init]

# The cloudflare route target.

# The Cloudflare <ACCOUNTS_OR_ZONES> route for selecting one or all zones.
# Valid values: accounts, zones
#
cfroute = zones

# Declare your Cloudflare Authorization Bearer Token in the [DEFAULT] section of your jail.local file.

# The Cloudflare <ZONE_ID> of the domain you want to manage.
Expand Down