Sign inSign up

neomediatech/fail2ban

By neomediatech

Updated 6 months ago

Fail2ban Docker image based on Ubuntu

Image
0

2.3K

neomediatech/fail2ban repository overview

Fail2ban Docker image based on Ubuntu

Clone this repo if you want to use configs already set by me.

Configs

VariableDefaultDescription
F2B_DEST_EMAILroot@localhostdestination email to receive reports
F2B_SENDERroot@$(hostname -f)sender email for reports
SSMTP_HOSTnoneSMTP host to use for send email
SSMTP_PORT25SMTP port
ABUSEIPDB_APIKEY(unset)API key taken from AbuseIPDB
REDIS_KEYbad:defer:honey:honey:0key used to store matches in a Redis server
REDIS_HOST127.0.0.1Redis server address
REDIS_PORT6379Redis server port
NODE_NAMEhoney-nodeAssign a name to this node
IGNORE_IP127.0.0.1IP or CIDR list to ignore from ban
(other settings)()see entrypoint.sh

Running

BASE_DIR="/srv/data/docker/containers/fail2ban/"
NAME="fail2ban"
docker run -d --privileged --net=host --name $NAME --hostname $NAME -v $BASE_DIR/confs:/data neomediatech/$NAME

Add a bind mount where to point your logs that f2b need to monitor for ex: -v $BASE_DIR/logs:/var/log

Warning

  • Portainer doesn't understand env_file parameter (at least for now, 27 feb 2019).
  • If you use fail2ban as Docker container keep attention to kernel version used in host and in compiling the image.
    If they differs may be you cannot see host iptables rules. (At least this is I saw using Ubuntu 22.04 on host and fail2ban compiled on a Ubunru 20.04). This is not a fail2ban problem, but a iptables problem with different kernels.

Wishlist

  • Use a init system to allow f2b to reload rules without reload container

Tag summary

Content type

Image

Digest

sha256:f582a01e4

Size

71.2 MB

Last updated

6 months ago

docker pull neomediatech/fail2ban