--- fail2ban_package_name: fail2ban fail2ban_jails: - name: sshd enabled: true port: ssh filter: sshd # Read the journal, not /var/log/auth.log: sshd logs to the journal on # Ubuntu 24.04 and rsyslog's auth.log stays empty. Pinned so detection does # not depend on the package's default backend. The filter's own journalmatch # applies. backend: systemd maxretry: 3 bantime: "1h" findtime: "10m" # Addresses, networks or hostnames that are never banned, on every jail (the [DEFAULT] section of jail.local covers the # jails of fail2ban_jails and the service jails in jail.d). The default is fail2ban's own. Add the machine that runs # Ansible, or a CI runner, so a mistyped key cannot lock automation out. An empty list exempts nothing, loopback included. fail2ban_ignoreip: - 127.0.0.1/8 - "::1" fail2ban_service: enabled: true state: started fail2ban_defaults: maxretry: 5 bantime: 600 findtime: 600