Skip to content

Commit

Permalink
Fix bad datepattern, add test log
Browse files Browse the repository at this point in the history
  • Loading branch information
bombsimon committed Jan 8, 2020
1 parent f84bb43 commit d5c2951
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/filter.d/unifi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Detecting unauthorized access to the Unifi Controller

[Init]
datepattern = ^%%Y-%%m-%%dT%%H:%%M:%%S,%%f
datepattern = %%Y-%%m-%%dT%%H:%%M:%%S,%%f

[Definition]
failregex = ^.*Failed \S+ login for <F-USER>\S+</F-USER> from <HOST>
4 changes: 4 additions & 0 deletions fail2ban/tests/files/logs/unifi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# failJSON: { "time": "2020-01-07T07:39:38", "match": true , "host": "172.17.0.1" }
[2020-01-07T07:39:38,484] <webapi-42> INFO api - [api] Failed admin login for foo from 172.17.0.1
# failJSON: { "time": "2020-01-07T09:53:55", "match": true , "host": "172.17.0.2" }
[2020-01-07T09:53:55,382] <webapi-232> INFO api - [api] Failed admin login for test from 172.17.0.2

0 comments on commit d5c2951

Please sign in to comment.