2.3.1-beta.1: CrowdSec on the same machine
A beta of 2.3.1, from the write-up in #32: CrowdSec installed on the haproxy-manager server itself, rather than on a machine of its own. That works in 2.3.0, but the interface and the guide both spoke as if it did not.
Nothing changes for an installation that does not use CrowdSec.
Getting the beta
- Updates page: tick Also offer beta versions, then update.
- Docker:
ghcr.io/avandeputte/haproxy-manager:2.3.1-beta.1 install.sh: the usual command with--ref beta.
What changed
- The AppSec URL hint no longer says "not 127.0.0.1". With CrowdSec on the same machine,
http://127.0.0.1:7422/is the right address, and the hint now says so. A listener on another machine still has to be on an address the node can reach. - The LAPI test says when it is talking to haproxy-manager. CrowdSec's LAPI wants port 8080, which the haproxy-manager interface already has. A LAPI URL left on that port used to get the LAPI answered 404. It now says that the address is haproxy-manager's own interface, and how to move the LAPI to another port. The LAPI URL hint mentions it too.
- HAProxy no longer logs two
SPOE:lines for every request. While CrowdSec was on, HAProxy wrote two extra lines per request to its log, beside the request's own line. Only a bouncer that fails is logged now. The change takes effect at the next Apply.
In the guide
The CrowdSec page has two new sections:
- CrowdSec on the same machine: installing the engine, moving its LAPI off port 8080, and AppSec on
127.0.0.1. - Bans from HAProxy's logs: the
crowdsecurity/haproxycollection and the journal acquisition, so that CrowdSec bans addresses that probe or crawl, on top of what AppSec refuses.
If you used a workaround for AppSec
A systemd drop-in that makes the bouncer read a copy of its configuration keeps it on that copy after the update. Fill in AppSec URL under Access › CrowdSec, Apply, then remove the drop-in and restart the bouncer. Until then, changes made in haproxy-manager do not reach the bouncer, and request bodies are not inspected.
Tested
On Debian 13 under systemd (HAProxy 3.0), with CrowdSec's engine and haproxy-manager on one machine: LAPI on port 8081, AppSec on 127.0.0.1:7422, a ban from HAProxy's log through to the 403 page. The log change also on the container image (HAProxy 3.4). Not tried: RPM systems.