Fail to ban in UBUNBTU 16.04.4 LTS
#apt-get update
#apt-get install fail2ban -y
#service fail2ban restart
#service fail2ban status
#vi
/etc/fail2ban/jail.local
[DEFAULT]
ignoreip = 127.0.0.1/8 YOUR_PREFERRED_IP/32 ::1
bantime = 3600
findtime = 600
maxretry = 5
[sshd]
enabled = true
port = ssh,78
filter = sshd
logpath = /var/log/auth.log
maxretry = 2
#service fail2ban restart
#service fail2ban status
#fail2ban-client status
#fail2ban-client status sshd
#
fail2ban-client set sshd unbanip selected_ip
Ref:
https://www.liquidweb.com/kb/install-configure-fail2ban-ubuntu-server-16-04/
Comments
Post a Comment