diff --git a/ChangeLog b/ChangeLog
index 42faaa5c..74f83e47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@ ver. 1.1.1-dev-1 (20??/??/??) - development nightly edition
* `filter.d/postfix.conf` - consider CONNECT and other rejected commands as a valid `_pref` (gh-3800)
* `filter.d/dropbear.conf`:
- recognizes extra pid/timestamp if logged into stdout/journal, added `journalmatch` (gh-3597)
+ - failregex extended to match different format of "Exit before auth" message (gh-3791)
* `filter.d/recidive.conf` - restore possibility to set jail name in the filter, _jailname is positive now (gh-3769)
* `filter.d/roundcube-auth.conf` - improved RE better matching log format of roundcube version 1.4+ (gh-3816)
* `filter.d/sshd.conf`:
diff --git a/config/filter.d/dropbear.conf b/config/filter.d/dropbear.conf
index b5329555..99f455ca 100644
--- a/config/filter.d/dropbear.conf
+++ b/config/filter.d/dropbear.conf
@@ -25,9 +25,10 @@ _daemon = dropbear
prefregex = ^%(__prefix_line)s(?:\[\d+\] \w{2,3} [\d:\s]+)?(?:[Ll]ogin|[Bb]ad|[Ee]xit).+$
-failregex = ^[Ll]ogin attempt for nonexistent user ('.*' )?from :\d+$
- ^[Bb]ad (PAM )?password attempt for .+ from (:\d+)?$
- ^[Ee]xit before auth \(user '.+', \d+ fails\): Max auth tries reached - user '.+' from :\d+\s*$
+failregex = ^[Ll]ogin attempt for nonexistent user (?:'.*' )?from :\d+$
+ ^[Bb]ad (?:PAM )?password attempt for '.+' from (?::\d+)?$
+ ^[Ee]xit before auth from \:\d+\>?: (?:\([^\)]*\): )?Max auth tries reached - user '.+'\s*$
+ ^[Ee]xit before auth \(user '.+', \d+ fails\): Max auth tries reached - user '.+' from :\d+\s*$
ignoreregex =
diff --git a/fail2ban/tests/files/logs/dropbear b/fail2ban/tests/files/logs/dropbear
index c945e3af..b010dddb 100644
--- a/fail2ban/tests/files/logs/dropbear
+++ b/fail2ban/tests/files/logs/dropbear
@@ -16,3 +16,8 @@ Jul 27 01:18:59 fail2ban-test dropbear[1477]: Login attempt for nonexistent user
# failJSON: { "time": "2005-07-10T23:53:52", "match": true , "host": "1.2.3.4", "desc": "extra pid/timestamp may be logged into journal, gh-3597" }
Jul 10 23:53:52 fail2ban-test dropbear[825]: [825] Jul 10 23:53:52 Bad password attempt for 'root' from 1.2.3.4:52289
+
+# failJSON: { "time": "2005-07-10T23:57:29", "match": true , "host": "192.0.2.3", "desc": "different message format, gh-3791" }
+Jul 10 23:57:29 fail2ban-test dropbear[825]: [825] Jul 10 23:57:29 Exit before auth from <192.0.2.3:52289>: (user 'root', 10 fails): Max auth tries reached - user 'root'
+# failJSON: { "time": "2005-07-10T23:59:24", "match": true , "host": "192.0.2.3", "desc": "different message format, gh-3791" }
+Jul 10 23:59:24 fail2ban-test dropbear[826]: [826] Jul 10 23:59:24 Exit before auth from <192.0.2.3:52325>: Max auth tries reached - user 'is invalid'