Skip to content

Commit a42ac4d

Browse files
itcmsgrclaude
andauthored
chore(v1.100.1a): CLI jail surgical rename — 3 operator-visible items (#498)
First step of v1.100.x stabilization train. Surgical scope only: - nftban stats --json dual-key alias (top_jails deprecated, top_filters new) - cmd_search.sh purpose comment edit - services.conf 9 comment sites edit Internal struct/type/function renames intentionally OUT of scope. Lifecycle completion (PR-25-30) remains explicitly OPEN. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 001e07f commit a42ac4d

4 files changed

Lines changed: 43 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212
---
1313

14+
## [Unreleased] - v1.100.1a CLI jail surgical rename
15+
16+
### Changed
17+
18+
- **`nftban stats --json` dual-key alias**: output now emits both
19+
`top_jails` and `top_filters` keys with the same value. `top_jails`
20+
is **deprecated** and will be removed in a later release; downstream
21+
consumers should migrate to `top_filters`. One-cycle deprecation per
22+
the locked surgical-rename scope (`top_jails` is the only operator-
23+
parseable surface affected; internal variable + function names
24+
unchanged in this release).
25+
- **`cli/lib/nftban/cli/cmd_search.sh`** purpose comment: replaced
26+
"jails" → "filters". Comment-only change, no behavior impact.
27+
- **`etc/nftban/conf.d/login/services.conf`** comment narration at
28+
9 sites: `[nftban-XXXX] jail``[nftban-XXXX] filter`. Comment-
29+
only edit; env var convention (`LOGIN_SERVICE_<SERVICE>_<SETTING>`)
30+
unchanged.
31+
32+
### Notes
33+
34+
- Internal struct/type renames (`escalation.BanEntry.Jail` field,
35+
`nftban_stats_top_jails` function name, etc.) are intentionally
36+
**out of scope** of this surgical rename. They will be addressed
37+
in a separate later PR if needed.
38+
- Lifecycle completion work (PR-25 restore execution, PR-26 verification
39+
gate, PR-27-30 maintenance) remains explicitly **open** and is not
40+
affected by this rename.
41+
42+
---
43+
1444
## [Unreleased] - v1.100 PR-22A + PR-22B repair cycle
1545

1646
### Changed

cli/lib/nftban/cli/cmd_search.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# NFTBan v1.0.0 - Search CLI Handler
55
# =============================================================================
66
# SPDX-License-Identifier: MPL-2.0
7-
# Purpose: Search for IP/Port across all ban lists, feeds, jails, and whitelists
7+
# Purpose: Search for IP/Port across all ban lists, feeds, filters, and whitelists
88
#
99
# meta:name="cmd_search"
1010
# meta:type="cli"

cli/lib/nftban/cli/cmd_stats.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,15 +658,16 @@ nftban_stats_cmd_dashboard() {
658658
},
659659
top_ips: $top_ips,
660660
top_countries: $top_countries,
661-
top_jails: $top_jails
661+
top_jails: $top_jails,
662+
top_filters: $top_jails
662663
}')
663664
else
664665
# Fallback without jq
665666
local portscan_enabled_json="false"
666667
[[ "$portscan_enabled" == "true" ]] && portscan_enabled_json="true"
667668
local ddos_enabled_json="false"
668669
[[ "$ddos_enabled" == "true" ]] && ddos_enabled_json="true"
669-
data="{\"period\":{\"since\":\"$since\",\"until\":\"$until\"},\"summary\":{\"total_bans\":$total_bans,\"active_bans\":$active_bans,\"total_countries\":$total_countries},\"breakdown\":{\"temporary\":{\"total\":$total_temp,\"ipv4\":$temp_v4,\"ipv6\":$temp_v6},\"blacklist\":{\"total\":$total_black,\"ipv4\":$black_v4,\"ipv6\":$black_v6},\"feeds\":{\"total\":$total_feed,\"ipv4\":$feed_v4,\"ipv6\":$feed_v6},\"whitelist\":{\"total\":$total_whitelist,\"ipv4\":$whitelist_v4,\"ipv6\":$whitelist_v6}},\"portscan\":{\"monitored_ports\":$portscan_monitored_ports,\"blocked_24h\":$portscan_blocked_24h,\"blocked_total\":$portscan_blocked_total,\"enabled\":$portscan_enabled_json},\"ddos\":{\"packets_dropped\":$ddos_packets_dropped,\"bytes_dropped\":$ddos_bytes_dropped,\"blocked_24h\":$ddos_blocked_24h,\"blocked_total\":$ddos_blocked_total,\"enabled\":$ddos_enabled_json},\"shared_state\":{\"feeds_active\":$feeds_active,\"feeds_ips\":$feeds_ips,\"rules_total\":$rules_total},\"top_ips\":$top_ips,\"top_countries\":$top_countries,\"top_jails\":$top_jails}"
670+
data="{\"period\":{\"since\":\"$since\",\"until\":\"$until\"},\"summary\":{\"total_bans\":$total_bans,\"active_bans\":$active_bans,\"total_countries\":$total_countries},\"breakdown\":{\"temporary\":{\"total\":$total_temp,\"ipv4\":$temp_v4,\"ipv6\":$temp_v6},\"blacklist\":{\"total\":$total_black,\"ipv4\":$black_v4,\"ipv6\":$black_v6},\"feeds\":{\"total\":$total_feed,\"ipv4\":$feed_v4,\"ipv6\":$feed_v6},\"whitelist\":{\"total\":$total_whitelist,\"ipv4\":$whitelist_v4,\"ipv6\":$whitelist_v6}},\"portscan\":{\"monitored_ports\":$portscan_monitored_ports,\"blocked_24h\":$portscan_blocked_24h,\"blocked_total\":$portscan_blocked_total,\"enabled\":$portscan_enabled_json},\"ddos\":{\"packets_dropped\":$ddos_packets_dropped,\"bytes_dropped\":$ddos_bytes_dropped,\"blocked_24h\":$ddos_blocked_24h,\"blocked_total\":$ddos_blocked_total,\"enabled\":$ddos_enabled_json},\"shared_state\":{\"feeds_active\":$feeds_active,\"feeds_ips\":$feeds_ips,\"rules_total\":$rules_total},\"top_ips\":$top_ips,\"top_countries\":$top_countries,\"top_jails\":$top_jails,\"top_filters\":$top_jails}"
670671
fi
671672
672673
json_output "true" "$data"

etc/nftban/conf.d/login/services.conf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# -----------------------------------------------------------------------------
2525
# Monitors: sshd login failures
2626
# Source: journalctl -u sshd / journalctl -u ssh
27-
# NFTBan native [nftban-sshd] jail
27+
# NFTBan native [nftban-sshd] filter
2828

2929
LOGIN_SERVICE_SSH_ENABLED="true"
3030

@@ -60,7 +60,7 @@ LOGIN_SERVICE_SSH_ROOT_PENALTY="0.25"
6060
# -----------------------------------------------------------------------------
6161
# Monitors: dovecot auth failures
6262
# Source: journalctl -u dovecot / /var/log/mail.log
63-
# NFTBan native [nftban-dovecot] jail
63+
# NFTBan native [nftban-dovecot] filter
6464

6565
LOGIN_SERVICE_DOVECOT_ENABLED="true"
6666

@@ -92,7 +92,7 @@ LOGIN_SERVICE_DOVECOT_RISK_MULTIPLIER="1.0"
9292
# -----------------------------------------------------------------------------
9393
# Monitors: exim SMTP auth failures
9494
# Source: journalctl -u exim / /var/log/exim/mainlog
95-
# NFTBan native [nftban-exim] jail
95+
# NFTBan native [nftban-exim] filter
9696

9797
LOGIN_SERVICE_EXIM_ENABLED="true"
9898

@@ -132,7 +132,7 @@ LOGIN_SERVICE_EXIM_RISK_MULTIPLIER="1.1"
132132
# -----------------------------------------------------------------------------
133133
# Monitors: postfix SMTP auth failures
134134
# Source: journalctl -u postfix / /var/log/mail.log
135-
# NFTBan native [nftban-postfix] jail
135+
# NFTBan native [nftban-postfix] filter
136136

137137
LOGIN_SERVICE_POSTFIX_ENABLED="true"
138138

@@ -164,7 +164,7 @@ LOGIN_SERVICE_POSTFIX_RISK_MULTIPLIER="1.0"
164164
# -----------------------------------------------------------------------------
165165
# Monitors: roundcube login failures
166166
# Source: journalctl -u php-fpm / /var/log/roundcube/errors
167-
# NFTBan native [nftban-roundcube] jail
167+
# NFTBan native [nftban-roundcube] filter
168168

169169
LOGIN_SERVICE_ROUNDCUBE_ENABLED="true"
170170

@@ -211,7 +211,7 @@ LOGIN_SERVICE_ROUNDCUBE_RISK_MULTIPLIER="0.9"
211211
# Monitors: xmlrpc.php abuse (brute force, amplification attacks)
212212
# Source: Apache/Nginx access logs
213213
# Confidence: HIGH - xmlrpc abuse is rarely legitimate at scale
214-
# NFTBan native [nftban-apache-xmlrpc] jail
214+
# NFTBan native [nftban-apache-xmlrpc] filter
215215
#
216216
# Why HIGH confidence:
217217
# - system.multicall allows 1000s of password attempts per request
@@ -252,7 +252,7 @@ LOGIN_SERVICE_WP_XMLRPC_CONFIDENCE="high"
252252
# Monitors: wp-login.php request rate (velocity-based detection)
253253
# Source: Apache/Nginx access logs
254254
# Confidence: MEDIUM - cannot distinguish success/fail from access logs
255-
# NFTBan native [nftban-apache-wp-login] jail
255+
# NFTBan native [nftban-apache-wp-login] filter
256256
#
257257
# Why MEDIUM confidence:
258258
# - HTTP 200/302 can be success OR failure
@@ -390,7 +390,7 @@ LOGIN_SERVICE_DRUPAL_CONFIDENCE="medium"
390390
# -----------------------------------------------------------------------------
391391
# Monitors: DirectAdmin login failures
392392
# Source: /var/log/directadmin/login.log
393-
# NFTBan native [nftban-directadmin] jail
393+
# NFTBan native [nftban-directadmin] filter
394394

395395
LOGIN_SERVICE_DIRECTADMIN_ENABLED="true"
396396

@@ -526,7 +526,7 @@ LOGIN_SERVICE_PLESK_MARKER_BIN="/usr/local/psa/admin/bin/httpdmng"
526526
# -----------------------------------------------------------------------------
527527
# Monitors: Pure-FTPd auth failures
528528
# Source: journalctl -u pure-ftpd / /var/log/pureftpd.log
529-
# NFTBan native [nftban-pure-ftpd] jail
529+
# NFTBan native [nftban-pure-ftpd] filter
530530

531531
LOGIN_SERVICE_PUREFTPD_ENABLED="true"
532532

0 commit comments

Comments
 (0)