Skip to content

Instantly share code, notes, and snippets.

@sparse91
Created July 31, 2019 12:37
Show Gist options
  • Save sparse91/fe4fc3f74727685a8cb55c4ecb3c1a9e to your computer and use it in GitHub Desktop.
Save sparse91/fe4fc3f74727685a8cb55c4ecb3c1a9e to your computer and use it in GitHub Desktop.
Fail2Ban filter and jail for Kerberos (krb5-kdc)
[krb5kdc]
enabled = true
filter = krb5kdc
bantime = 86400
maxretry = 6
backend = systemd
banaction = iptables-allports
protocol = all
[INCLUDES]
before = common.conf
[Definition]
_daemon = krb5kdc
failregex = AS_REQ \([\w\s{}]+\) <HOST>: (PREAUTH_FAILED|CLIENT_NOT_FOUND):
ignoreregex =
[Init]
# "maxlines" is number of log lines to buffer for multi-line regex searches
maxlines = 10
journalmatch = _SYSTEMD_UNIT=krb5-kdc.service + _COMM=krb5-kdc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment