Skip to content

Update Dev from main branch#141

Merged
swissmakers merged 18 commits into
devfrom
main
May 17, 2026
Merged

Update Dev from main branch#141
swissmakers merged 18 commits into
devfrom
main

Conversation

@swissmakers
Copy link
Copy Markdown
Owner

No description provided.

swissmakers and others added 18 commits March 18, 2026 15:17
Improved language system, added catalan, added fail2ban-UI logo / favicon and updated tailwindcss
Rename some translations and fix logo-gab on left logo side
Revert license back to GPL-3.0
Add linux jq package as dependency
Implement local write-test for local managed files and use some delay for first time-local init
The dashboard's /api/summary handler enumerates every active jail and
returns the FULL banned-IP list for each. On hosts with large jails
(e.g. 4,500+ active bans on one jail across 17 active jails), this
single endpoint can take 3+ minutes to respond, exceeding any
reasonable HTTP gateway/proxy timeout (we hit a 60s ALB idle_timeout
default that returned 504). The dashboard renders only the first 5
IPs per jail by default (renderBannedIPs, maxVisible=5), so returning
a few hundred is more than enough for the UI's needs.

This patch caps BannedIPs per jail at 100 (configurable via the
FAIL2BAN_UI_SUMMARY_MAX_IPS env var; set to 0 to disable). The
accurate TotalBanned count is always preserved -- only the BannedIPs
slice is truncated.

Reproduction:

    fail2ban-client status nginx-property-scraper  # ~4500 banned IPs
    curl http://localhost:8080/api/summary?serverId=local
    # times out at >180s

After the patch (FAIL2BAN_UI_SUMMARY_MAX_IPS=100):

    curl http://localhost:8080/api/summary?serverId=local
    # responds in <1s, 100 IPs per jail, accurate TotalBanned

Trade-offs: a future user who actually wants the full IP list per jail
in /api/summary can opt out via FAIL2BAN_UI_SUMMARY_MAX_IPS=0. A
follow-up could expose the full list via a paginated /api/jails/:jail
endpoint, but that's out of scope for this fix.
feat(api): cap banned IPs per jail in /api/summary response
@swissmakers swissmakers merged commit 254d935 into dev May 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants