# Custom Fail2ban Jails for Custom PHP Framework # Generated by Ansible - Do not edit manually {% for jail in fail2ban_jails %} [{{ jail.name }}] enabled = {{ jail.enabled | ternary('true', 'false') }} {% if jail.port is defined %} port = {{ jail.port }} {% endif %} {% if jail.filter is defined %} filter = {{ jail.filter }} {% endif %} {% if jail.logpath is defined %} logpath = {{ jail.logpath }} {% endif %} {% if jail.maxretry is defined %} maxretry = {{ jail.maxretry }} {% endif %} {% if jail.findtime is defined %} findtime = {{ jail.findtime }} {% endif %} {% if jail.bantime is defined %} bantime = {{ jail.bantime }} {% endif %} {% if jail.backend is defined %} backend = {{ jail.backend }} {% endif %} action = %(action_mwl)s {% endfor %} # PHP Framework specific jail [php-framework] enabled = true port = http,https filter = php-framework logpath = /var/log/nginx/access.log /var/log/nginx/error.log maxretry = 5 findtime = 600 bantime = 3600 action = %(action_mwl)s php-framework-notify # Docker container protection [docker-php] enabled = {{ 'true' if environment == 'production' else 'false' }} port = http,https filter = docker-php logpath = /var/log/docker/*.log maxretry = 3 findtime = 300 bantime = 1800 # Custom application errors [app-errors] enabled = true port = http,https filter = nginx-limit-req logpath = /var/log/nginx/error.log maxretry = 10 findtime = 600 bantime = 600