[DEFAULT] # Ban hosts for 1 hour bantime = 3600 # Check for repeated failures for 10 minutes findtime = 600 # Allow 3 failures before banning maxretry = 3 # Email notifications (configured via fail2ban_destemail variable) {% if fail2ban_destemail | default('') | length > 0 %} destemail = {{ fail2ban_destemail }} sender = {{ fail2ban_sender | default(fail2ban_destemail) }} action = {{ fail2ban_action | default('%(action_mwl)s') }} {% else %} # Email notifications disabled (set fail2ban_destemail in group_vars/all/main.yml to enable) {% endif %} [sshd] enabled = true port = ssh filter = sshd logpath = /var/log/auth.log maxretry = 3 [apache] enabled = false port = http,https filter = apache-auth logpath = /var/log/apache2/error.log maxretry = 3 [nginx-http-auth] enabled = false port = http,https filter = nginx-http-auth logpath = /var/log/nginx/error.log maxretry = 3