Skip to content

Instantly share code, notes, and snippets.

@linuxpld
Forked from jkljajic/mssqld-auth.conf
Created November 14, 2020 13:03
Show Gist options
  • Save linuxpld/0aa3ea0237502c69f78924bc7fe44f45 to your computer and use it in GitHub Desktop.
Save linuxpld/0aa3ea0237502c69f78924bc7fe44f45 to your computer and use it in GitHub Desktop.
fail2Ban filter for MSSQL LInux
# Fail2Ban filter for unsuccesfull MSSQL authentication attempts
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[Definition]
_daemon = mssqld
failregex = ^%(__prefix_line)s.*Login failed for user '[A-Za-z ]*'. Reason: .*provided. \[CLIENT: <HOST>\]
#failregex = ^%(__prefix_line)s.*Login failed for user '[A-Za-z ]*'. Reason: Password did not match that for the login provided. \[CLIENT: <HOST>
#Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: <HOST>]*\s*$
ignoreregex =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment