Skip to content

Instantly share code, notes, and snippets.

@mpetroff
Last active March 28, 2025 03:19
Show Gist options
  • 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