Update
This commit is contained in:
7
10-Fail2ban/jail.local
Normal file
7
10-Fail2ban/jail.local
Normal file
@@ -0,0 +1,7 @@
|
||||
[sshd]
|
||||
enabled = true
|
||||
port = 2222
|
||||
filter = sshd
|
||||
logpath = /var/log/auth.log
|
||||
maxretry = 3
|
||||
bantime = 3600
|
@@ -16,5 +16,16 @@ apt install -y fail2ban >> /dev/null
|
||||
echo "${YELLOW} * ${NOCOLOR} Installation composant : ${GREEN} OK"
|
||||
echo "${NOCOLOR}"
|
||||
|
||||
cp 10-Fail2ban/jail.local /etc/fail2ban/jail.local >> /dev/null
|
||||
|
||||
echo "${YELLOW} * ${NOCOLOR} Relance de service"
|
||||
echo "${NOCOLOR}"
|
||||
|
||||
systemctl enable fail2ban
|
||||
systemctl start fail2ban
|
||||
|
||||
echo "${YELLOW} * ${NOCOLOR} Relance de service : ${GREEN} OK"
|
||||
echo "${NOCOLOR}"
|
||||
|
||||
echo "${YELLOW} ** ${NOCOLOR} Fin du script : 10-Fail2Ban"
|
||||
echo "${NOCOLOR}"
|
Reference in New Issue
Block a user