Removing IP Limit from the x-ui menu saved nothing, so the next update, reinstall or panel self-update installed Fail2ban again and re-enabled the host-wide 3x-ipl jail.
The choice is now written to the panel's env file and every later install and update reads it first. A fresh native install asks before enabling enforcement (Enter declines) and an unattended one enables it only with XUI_ENABLE_FAIL2BAN=true; a stored choice wins over the process environment. Hosts that already have the jail configured and nothing stored are left as they are. The menu restarts the panel so it runs with the same value, and OpenRC exports it to the service.
Removal and reload touch only the managed jail, and the package is uninstalled only when 3x-ipl is the sole jail, so a distro-enabled sshd jail keeps Fail2ban installed. The journal backend override for Debian 12+ and Ubuntu 22.04+ now targets the stock sshd jail and leaves operator backend and log settings alone.
Fixes#7222
* fix(database): keep IP limits when the fail2ban probe is inconclusive
ResetIpLimitNoFail2ban clears limitIp on every client — inbound settings JSON
and the clients table — whenever fail2banCanEnforce() returns false, then
records itself in the seeder history so it never re-evaluates. The probe was a
single `fail2ban-client -h` run, so it answered false both when fail2ban is
genuinely absent and when the command merely failed that once: a panel that
starts before fail2ban is up, or in a container where it is installed a moment
later, permanently loses every configured limit with no log line and no way
back.
Separate the two. A missing binary still means "absent" and the cleanup runs as
before; a binary that exists but will not run is reported as unknown, leaves the
configured values untouched, logs why, and does not record the seeder, so the
next start decides again.
* test(database): cover fail2ban reset safeguards
---------
Co-authored-by: n0ctal <293235942+n0ctal@users.noreply.github.com>