From c5a742ed9968ac065388f62f3a0baad602c15159 Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Sun, 15 Sep 2024 23:16:20 -0400 Subject: [PATCH] add f2b --- docker/npm/docker-compose.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docker/npm/docker-compose.yml b/docker/npm/docker-compose.yml index b2d8303..ec10dc9 100644 --- a/docker/npm/docker-compose.yml +++ b/docker/npm/docker-compose.yml @@ -11,3 +11,27 @@ services: - /docker/appdata/nginx/data:/data - /docker/appdata/nginx/letsencrypt:/etc/letsencrypt restart: unless-stopped + + fail2ban: + image: crazymax/fail2ban:latest + container_name: fail2ban_docker-pi + network_mode: "host" + cap_add: + - NET_ADMIN + - NET_RAW + volumes: + - "/docker/appdata/fail2ban/data:/data" + - "/var/log/auth.log:/var/log/auth.log:ro" + - "/docker/appdata/nginx/data/logs/:/log/npm/:ro" + environment: + - TZ=America/New_York + - F2B_LOG_TARGET=STDOUT + - F2B_LOG_LEVEL=INFO + - F2B_DB_PURGE_AGE=1d + - SSMTP_HOST=$SSMTP_HOST + - SSMTP_PORT=587 + - SSMTP_HOSTNAME=$SSMTP_HOSTNAME + - SSMTP_USER=$SSMTP_USER + - SSMTP_PASSWORD=$SSMTP_PASSWORD + - SSMTP_TLS=YES + restart: always \ No newline at end of file