Need some help with Docker, Cloudflare tunnels and Fail2Ban reddit / selfhosted ---------------------------------------------------------------------- Jwt4000 · 2023-10-25 20:54 Hey all, I have a VPS that is currently running a couple docker containers. I don't understand how to get Fail2Ban working with the containers and Cloudflare Tunnels. Can anyone point me in the right direction? ​ Thanks! ---------------------------------------------------------------------- thekrautboy · 2023-10-25 21:08 You provide so many details about the setup and the exact problem, i dont even know where to begin, sorry. ---------------------------------------------------------------------- Jwt4000 · 2023-10-25 21:11 What other details do you need? Do you need to know the specific docker containers I am running? ---------------------------------------------------------------------- thekrautboy · 2023-10-25 21:16 What have you tried so far, where do you get stuck exactly? Error messages? Log output? ---------------------------------------------------------------------- Jwt4000 · 2023-10-25 21:18 I don't understand how fail2ban can access logs from a docker container. ---------------------------------------------------------------------- Reasonable-Ladder300 · 2023-10-25 21:22 Do you have some kind pf reverse proxy set up? I know traefik offers a fail2ban plugin. ---------------------------------------------------------------------- Jwt4000 · 2023-10-25 21:32 I don't, but I guess I might need to. I have my VPN with no ports open and using cloudflare tunnels to access the docker containers. ---------------------------------------------------------------------- Reasonable-Ladder300 · 2023-10-25 21:51 Do you need fail2ban on top of your vpn? For me my vpn is enough since it only responds to connections with a valid configuration. ---------------------------------------------------------------------- watchdog_timer · 2023-10-26 13:21 linuxserver.io has a reverse proxy container called [SWAG](https://docs.linuxserver.io/general/swag) that integrates fail2ban with an Nginx reverse proxy. You could set that container up as a proxy to your other containers, than 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.