https://github.com/eniehack/fail2ban-cloudflare-action
scripts to block src ip addresses using cloudflare custom rule as fail2ban's action
https://github.com/eniehack/fail2ban-cloudflare-action
cloudflare-api cloudflare-rules fail2ban-action golang python3
Last synced: 3 months ago
JSON representation
scripts to block src ip addresses using cloudflare custom rule as fail2ban's action
- Host: GitHub
- URL: https://github.com/eniehack/fail2ban-cloudflare-action
- Owner: eniehack
- Created: 2025-08-25T05:12:20.000Z (5 months ago)
- Default Branch: trunk
- Last Pushed: 2025-08-27T10:24:36.000Z (5 months ago)
- Last Synced: 2025-09-26T03:52:03.339Z (4 months ago)
- Topics: cloudflare-api, cloudflare-rules, fail2ban-action, golang, python3
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.ja.md
Awesome Lists containing this project
README
# fail2ban-cloudflare-action
fail2banのactionとしてcloudflare custom ruleを操作するためのスクリプト群
- rulegen - 1行ごとにipアドレスが記述されたテキストファイルを受け取り、Cloudflare custom ruleを生成する
- ipmglist.py - ipアドレスをBAN/un-BANするためのスクリプト。jail.localから呼び出されることを想定
- ruledeploy - Cloudflare APIを使ってcustom ruleをdeployする
## install
### depends
- python3
- requests (pythonのライブラリ。deploy_cf_rule.py または deploy_cf_rule_systemd.pyを利用する際に必要)
- inotifywait (dnf、aptのリポジトリではinotify-toolsパッケージに同梱されています。`contrib/iplistwatch.sh`を利用する場合には必要)