An open API service indexing awesome lists of open source software.

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

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`を利用する場合には必要)