./setup.sh debug fail2ban does not show banned IPs for some reason
root@raspberrypi:/etc/mailserver# ./setup.sh debug fail2ban
No IPs have been banned.
However, there are banned IPs actually.
root@raspberrypi:/etc/mailserver# docker exec -it mailserver fail2ban-client status postfix
Status for the jail: postfix
|- Filter
| |- Currently failed: 0
| |- Total failed: 0
| `- File list: /var/log/mail.log
`- Actions
|- Currently banned: 1
|- Total banned: 1
`- Banned IP list: 167.***.***.203
When I'm trying to verify iptables rules form inside the container I get the following error
root@mail:/# iptables -S INPUT
iptables v1.8.2 (legacy): can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
However, on my host system iptables works perfectly.
RaspberryPi is running on latest Raspbian 10 Buster OS.
My docker-compose.yml
services:
mailserver:
container_name: mailserver
image: docker.io/mailserver/docker-mailserver
hostname: mail
domainname: domain.com
environment:
- ENABLE_FAIL2BAN=1
- ENABLE_POP3=1
- ENABLE_SPAMASSASSIN=1
- SPAMASSASSIN_SPAM_TO_INBOX=1
- ENABLE_POSTGREY=1
- ENABLE_SASLAUTHD=0
- ONE_DIR=1
- SSL_TYPE=manual
- SSL_CERT_PATH=/etc/letsencrypt/live/domain.com/fullchain.pem
- SSL_KEY_PATH=/etc/letsencrypt/live/domain.com/privkey.pem
env_file:
- mailserver.env
ports:
- "25:25"
- "110:110"
- "143:143"
- "465:465"
- "587:587"
- "993:993"
- "995:995"
volumes:
- ./config/data/maildata:/var/mail
- ./config/data/mailstate:/var/mail-state
- ./config/data/maillogs:/var/log/mail
- ./config:/tmp/docker-mailserver
- /etc/letsencrypt:/etc/letsencrypt:ro
- /etc/localtime:/etc/localtime:ro
cap_add:
- NET_ADMIN
- SYS_PTRACE
restart: unless-stopped
./setup.sh debug fail2bandoes not show banned IPs for some reasonHowever, there are banned IPs actually.
When I'm trying to verify iptables rules form inside the container I get the following error
However, on my host system iptables works perfectly.
RaspberryPi is running on latest Raspbian 10 Buster OS.
My
docker-compose.yml