From b41c8bf1a6be9f775720ed8939d3f61dd7638754 Mon Sep 17 00:00:00 2001 From: Owen Rees Date: Fri, 13 Nov 2026 13:57:33 +0100 Subject: [PATCH] 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. --- deploy/README.md | 11 ++++++++--- docs/security.md | 14 +++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/deploy/README.md b/deploy/README.md index 40df221..df36ff9 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -566,9 +566,9 @@ receive `403 Access Denied`. Do not let a deploy overwrite the shared Caddyfile. See `docs/security.md` for the application throttle, real-IP setup and the -Cloudflare edge controls. Production currently has Bot Fight Mode enabled and -the free-plan login flood rule: 10 POSTs per 10 seconds per IP, blocked for 10 -seconds. +Cloudflare edge controls. Production currently has Bot Fight Mode off (see +#153) and the free-plan login flood rule: 10 POSTs per 10 seconds per IP, +blocked for 10 seconds. ## Building a release @@ -888,6 +888,11 @@ sudo systemctl daemon-reload 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: ```sh diff --git a/docs/security.md b/docs/security.md index d77b596..a4691fa 100644 --- a/docs/security.md +++ b/docs/security.md @@ -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 `chesstrainer-cloudflare-ranges.timer`. - `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 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 throttle. -Bot Fight Mode is enabled as the plan-level bot control. 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. +Bot Fight Mode is off. On the free plan it cannot be skipped for CI or for the +on-box health probe, so a datacenter `curl` gets a 403 while the site itself is +healthy; #153 covers the gate and probe changes needed before it goes back on. +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