-
-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
153 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1710,6 +1710,33 @@ Patch_9_6() | |
# Remove obsolete drop-in config: https://github.com/MichaIng/DietPi/issues/7104 | ||
[[ -f '/etc/systemd/system/[email protected]/dietpi.conf' ]] && G_EXEC rm -R /etc/systemd/system/[email protected]/dietpi.conf | ||
[[ -d '/etc/systemd/system/[email protected]' ]] && G_EXEC rmdir --ignore-fail-on-non-empty /etc/systemd/system/[email protected] | ||
|
||
# Fix filter for STDOUT logging since Bookworm: https://github.com/fail2ban/fail2ban/pull/3597 | ||
if [[ -f '/etc/fail2ban/filter.d/dropbear.conf' && ! -f '/etc/fail2ban/filter.d/dropbear.local' ]] | ||
then | ||
G_DIETPI-NOTIFY 2 'Fixing Dropbear Fail2Ban filter for STDOUT logging since Bookworm: https://github.com/fail2ban/fail2ban/pull/3597' | ||
cat << '_EOF_' > /etc/fail2ban/filter.d/dropbear.local | ||
[INCLUDES] | ||
before = common.conf | ||
[Definition] | ||
_daemon = dropbear | ||
# Fix filter for STDOUT logging since Bookworm: https://github.com/fail2ban/fail2ban/pull/3597 | ||
prefregex = ^%(__prefix_line)s(\[\d+\] [A-Z][a-z]+ \d\d \d\d:\d\d:\d\d )?<F-CONTENT>(?:[Ll]ogin|[Bb]ad|[Ee]xit).+</F-CONTENT>$ | ||
failregex = ^[Ll]ogin attempt for nonexistent user ('.*' )?from <HOST>:\d+$ | ||
^[Bb]ad (PAM )?password attempt for .+ from <HOST>(:\d+)?$ | ||
^[Ee]xit before auth \(user '.+', \d+ fails\): Max auth tries reached - user '.+' from <HOST>:\d+\s*$ | ||
ignoreregex = | ||
# Add journalmatch to enhance performance since Bookworm | ||
journalmatch = _SYSTEMD_UNIT=dropbear.service + _COMM=dropbear | ||
_EOF_ | ||
G_EXEC systemctl restart fail2ban | ||
fi | ||
} | ||
|
||
# v6.35 => v7 migration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters