Differences
This shows you the differences between two versions of the page.
| wiki:cloudflare [2024/04/10 20:28] – created none | wiki:cloudflare [2024/04/10 20:32] (current) – none | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | =====Fail2Ban Integration===== | ||
| + | **Filter** | ||
| + | <code file / | ||
| + | [Definition] | ||
| + | failregex = ^< | ||
| + | ignoreregex = | ||
| + | </ | ||
| + | |||
| + | **Action** | ||
| + | <code file / | ||
| + | [Definition] | ||
| + | actionstart = | ||
| + | actionstop = | ||
| + | actioncheck = | ||
| + | actionban = curl -s \ | ||
| + | -H " | ||
| + | -H " | ||
| + | -H " | ||
| + | -X POST " | ||
| + | | ||
| + | actionunban = curl -s \ | ||
| + | -H " | ||
| + | -H " | ||
| + | -H " | ||
| + | -X DELETE " | ||
| + | curl -s -H " | ||
| + | -H " | ||
| + | -H " | ||
| + | -X GET " | ||
| + | |jq --raw-output ' | ||
| + | [Init] | ||
| + | </ | ||
| + | |||
| + | **Jail** | ||
| + | <code file / | ||
| + | [nginx-custom] | ||
| + | enabled = true | ||
| + | filter = custom-nginx-login | ||
| + | action = cloudflare[cf_email=" | ||
| + | logpath = / | ||
| + | findtime = 600 | ||
| + | bantime = 3600 | ||
| + | maxretry = 50 | ||
| + | </ | ||
| + | |||