This commit is contained in:
ale 2020-08-22 16:58:52 +02:00
parent d6bd681606
commit a3a4e8cbc1
4 changed files with 8 additions and 10 deletions

View File

@ -1,10 +1,8 @@
# PerroChivato - fail2ban ssh abuse with email to provider # HatThieves `fail2ban` with abuse reporting system
## ANTIBOTNET SYSTEM
## Config ## Config
### edit `entrypoint.sh` with your smtp settings #### edit [entrypoint.sh](fail2ban/entrypoint.sh) with your smtp settings
## Expose jail ## Expose jail
``` ```

View File

@ -6,14 +6,13 @@ services:
hostname: fail2ban hostname: fail2ban
container_name: fail2ban container_name: fail2ban
restart: always restart: always
privileged: true
entrypoint: entrypoint:
- /bin/bash - /bin/bash
- /etc/fail2ban/entrypoint.sh - /etc/fail2ban/entrypoint.sh
volumes: volumes:
- ./fail2ban/entrypoint.sh:/etc/fail2ban/entrypoint.sh:ro - ./fail2ban/entrypoint.sh:/etc/fail2ban/entrypoint.sh:ro
- ./fail2ban/sshd_config:/etc/ssh/sshd_config:ro - ./fail2ban/sshd_config:/etc/ssh/sshd_config:ro
ports: cap_add:
- 22:22/tcp - NET_ADMIN
- 2222:2222/tcp - NET_RAW
network_mode: host network_mode: host

View File

@ -1,3 +1,3 @@
FROM debian:sid-slim FROM debian:sid-slim
RUN apt update && apt -y upgrade && apt -y install fail2ban openssh-server rsyslog swaks host python3-pyinotify && apt clean RUN apt update && apt -y upgrade && apt -y install fail2ban openssh-server rsyslog swaks host python3-pyinotify iptables && apt clean
WORKDIR /etc/fail2ban WORKDIR /etc/fail2ban

View File

@ -118,7 +118,8 @@ logpath = /dev/null" > action.d/sendmail-abuse.conf
echo "[sshd] echo "[sshd]
enabled = true enabled = true
bantime = 10800 bantime = 10800
maxretry = 4 findtime = 1800
maxretry = 2
ignoreip = $DOMAIN ignoreip = $DOMAIN
backend = pyinotify backend = pyinotify
filter = sshd filter = sshd