sudo apt-get install fail2ban
step2
sudo cp/etc/fail2ban/jail.conf /etc/fail2ban/jail.conf.back
step3
sudo nano /etc/fail2ban/jail.conf
step4
change bantime to any number of seconds you like
step5
change maxretry to any numbers you wish
step6
change false to true to enable protection
step7
change max retry to any number you wish
step8
don't forget to enable vsftpd (if you do sftp or ftp file transfer)
step9
now you need to restart fail2ban command is
/etc/init.d/fail2ban restart
if it's works for you just fine if don't works follow me
------------------- As I promised troubleshoot or (dance with a tambourine) ---------------------
step10
step 11
sudo service fail2ban start
sudo fail2ban-client status
results: now we see only default settings working (bad)
step 12
cd / now you need change to fail2ban directory and remove file fail2ban.sock
step 13
cd /var/run/fail2ban/
step 14
before removing a file make copy of fail2ban.sock
sudo cp /var/run/fail2ban/fail2ban.sock /home/abel/fail2ban.sock.back
step 15
sudo rm -rf fail2ban.sock
step 16
/etc/init.d/fail2ban restart
step 17
sudo fail2ban-client status Now you see all the service are enabled (good)
thanks !!! great post !!! good luck !!!
ReplyDelete