Fix deploy docs: Bot Fight Mode status and probe reinstall (#167)

* Record that Bot Fight Mode is off

Both docs still claimed Bot Fight Mode was enabled. It is off; the Caddy
origin allowlist stays in force. Neither CI nor the on-box probe can get
past it on the free plan, so re-enabling needs the changes tracked in #153.

* Note that the probe must be installed to two places

The timer runs /usr/local/sbin/chesstrainer-probe, not the copy under
/opt/chesstrainer/src. Say so next to the install block, as the backup
section already does, so a changed deploy/probe does not silently drift
from what the timer runs.
This commit is contained in:
2026-11-13 13:57:33 +01:00
committed by GitHub
parent 69b89f68ef
commit b41c8bf1a6
2 changed files with 17 additions and 8 deletions
+8 -3
View File
@@ -566,9 +566,9 @@ receive `403 Access Denied`.
Do not let a deploy overwrite the shared Caddyfile. Do not let a deploy overwrite the shared Caddyfile.
See `docs/security.md` for the application throttle, real-IP setup and the See `docs/security.md` for the application throttle, real-IP setup and the
Cloudflare edge controls. Production currently has Bot Fight Mode enabled and Cloudflare edge controls. Production currently has Bot Fight Mode off (see
the free-plan login flood rule: 10 POSTs per 10 seconds per IP, blocked for 10 #153) and the free-plan login flood rule: 10 POSTs per 10 seconds per IP,
seconds. blocked for 10 seconds.
## Building a release ## Building a release
@@ -888,6 +888,11 @@ sudo systemctl daemon-reload
sudo systemctl enable --now chesstrainer-probe.timer sudo systemctl enable --now chesstrainer-probe.timer
``` ```
The timer runs the installed `/usr/local/sbin/chesstrainer-probe`, not the copy
under `/opt/chesstrainer/src`, because that tree belongs to the application
user. When `deploy/probe` changes, install it to both places so the timer and
the repo agree.
Verify: Verify:
```sh ```sh
+9 -5
View File
@@ -11,7 +11,8 @@ addresses and would ban Cloudflare edge addresses on this deployment.
`CF-Connecting-IP` as `X-Forwarded-For`. The ranges are refreshed hourly by `CF-Connecting-IP` as `X-Forwarded-For`. The ranges are refreshed hourly by
`chesstrainer-cloudflare-ranges.timer`. `chesstrainer-cloudflare-ranges.timer`.
- `TRUST_FORWARDED_FOR=true`, so the app throttles by the real visitor address. - `TRUST_FORWARDED_FOR=true`, so the app throttles by the real visitor address.
- Cloudflare Bot Fight Mode is enabled. - Cloudflare Bot Fight Mode is off. The Caddy origin allowlist above stays in
force; re-enabling is tracked in #153.
- The free-plan login flood rule allows 10 login POSTs per 10 seconds per IP and - The free-plan login flood rule allows 10 login POSTs per 10 seconds per IP and
blocks for 10 seconds. blocks for 10 seconds.
@@ -155,10 +156,13 @@ address after ten failures within fifteen minutes. A slow attacker staying under
10 requests per 10 seconds never gets to make useful guesses because of the app 10 requests per 10 seconds never gets to make useful guesses because of the app
throttle. throttle.
Bot Fight Mode is enabled as the plan-level bot control. If the plan later gains Bot Fight Mode is off. On the free plan it cannot be skipped for CI or for the
longer rate-limit windows or managed WAF rules, raise the block duration and on-box health probe, so a datacenter `curl` gets a 403 while the site itself is
consider a broader site-wide rule, such as 100 requests per 10 seconds per IP healthy; #153 covers the gate and probe changes needed before it goes back on.
with a managed challenge. Use Under Attack Mode during an active incident. If the plan later gains longer rate-limit windows or managed WAF rules, raise
the block duration and consider a broader site-wide rule, such as 100 requests
per 10 seconds per IP with a managed challenge. Use Under Attack Mode during an
active incident.
### Registration cannot be limited this way ### Registration cannot be limited this way