Skip to content
Snippets Groups Projects
Commit 85f75aec authored by Elian Loraux's avatar Elian Loraux
Browse files

add banaction config

parent 577f27d6
Branches
No related tags found
1 merge request!19ajout du services bannisement
......@@ -7,6 +7,7 @@ logpath = /home/dockerweb/traefik/log/access.log
chain = DOCKER-USER
mode = aggressive
findtime = 4h
banaction = docker-page
EOF
cat <<EOF > /etc/fail2ban/jail.d/nocloud_base.conf
[sshd]
......@@ -21,5 +22,17 @@ banaction = %(banaction_allports)s
bantime = 1w
findtime = 1d
EOF
fail2ban-client reload
cat <<EOF > /etc/fail2ban/action.d/docker-page.conf
[Definition]
actionstart =
actionstop =
actioncheck =
actionban = cd /home/dockerweb/ban; bash ban.sh <ip>
actionunban = cd /home/dockerweb/ban; bash unban.sh <ip>
EOF
fail2ban-client reload
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment