Skip to content

Instantly share code, notes, and snippets.

@mpetroff
Last active December 19, 2023 12:06
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpetroff/4482c42020b6cb39b486dea6bf337420 to your computer and use it in GitHub Desktop.
Save mpetroff/4482c42020b6cb39b486dea6bf337420 to your computer and use it in GitHub Desktop.
JupyterHub PAM Authentication Fail2ban Configuration
# /etc/fail2ban/jail.local
[jupyterhub]
enabled = true
port = 443
filter = jupyterhub
backend = systemd
maxretry = 6
# /etc/fail2ban/filter.d/jupyterhub.conf
[Definition]
failregex = PAM Authentication failed \(.*@<HOST>\)
404 (GET|HEAD|POST|PUT|DELETE) .* \(@<HOST>\) .*ms
ignoreregex = ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment