Skip to content

Instantly share code, notes, and snippets.

@bensig
Created September 22, 2022 02:40
Show Gist options
  • Save bensig/13b32ba90abe9bae29df79cebd54832f to your computer and use it in GitHub Desktop.
Save bensig/13b32ba90abe9bae29df79cebd54832f to your computer and use it in GitHub Desktop.
Fail2ban for haproxy
[INCLUDES]
before = paths-debian.conf
[DEFAULT]
ignoreip = 3.229.118.187/32
[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
[recidive]
enabled = true
bantime = 31536000 ; 1 year
findtime = 18144000 ; 1 month
maxretry = 2
logpath = /var/log/fail2ban.log
banaction = %(banaction_allports)s
[haproxy-http-auth]
logpath = /var/log/haproxy.log
enabled = true
findtime = 120
maxretry = 1
bantime = -1
[haproxy-env]
logpath = /var/log/haproxy.log
enabled = true
findtime = 120
maxretry = 1
bantime = -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment