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
## ANTIBOTNET SYSTEM
# HatThieves `fail2ban` with abuse reporting system
## Config
### edit `entrypoint.sh` with your smtp settings
#### edit [entrypoint.sh](fail2ban/entrypoint.sh) with your smtp settings
## Expose jail
```

View File

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

View File

@ -1,3 +1,3 @@
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

View File

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