Browse Source

fix fail2ban

Bachir Soussi Chiadmi 4 years ago
parent
commit
84691bb6d5
2 changed files with 2 additions and 1 deletions
  1. 1 1
      assets/knockd.conf
  2. 1 0
      bin/fail2ban.sh

+ 1 - 1
assets/knockd.conf

@@ -24,4 +24,4 @@
       tcpflags    = syn
       cmd_timeout   = 600
       # stop_command  = ufw delete allow from %IP% to any port 22
-      stop_command  = ufw delete allow ssh
+      stop_command = ufw delete allow ssh

+ 1 - 0
bin/fail2ban.sh

@@ -20,6 +20,7 @@ sleep 2
 apt-get --yes --force-yes install fail2ban
 cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
 # ToDo ask for email and configure jail.local with it
+touch /var/log/auth.log
 systemctl enable fail2ban
 systemctl restart fail2ban
 echo -e "\033[92;1mfail2ban installed and configured\033[Om"