1
linuxserver.io has a reverse proxy container called SWAG that integrates fail2ban with an Nginx reverse proxy. You could set that container up as a proxy to your other containers, then point your Cloudflare tunnel to the reverse proxy. I'm in the middle of setting this up on my own homelab, so feel free to reach out if you have any questions.