Skip to content

Instantly share code, notes, and snippets.

@jkljajic
Created December 17, 2017 13:56
Show Gist options
  • Save jkljajic/ff1e5f95bd8e01f6eed1261e4d22fa16 to your computer and use it in GitHub Desktop.
Save jkljajic/ff1e5f95bd8e01f6eed1261e4d22fa16 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