How To Protect SSH With Fail2Ban on CentOS 7




Today im going to show how to configure Fail2ban on Centos 7 and block SSH attempts.

Install Fail2ban on CentOS 7


# sudo yum install epel-release

# yum install fail2ban



# systemctl enable fail2ban




Configure Local Settings


# nano /etc/fail2ban/jail.local




Paste the following:
/etc/fail2ban/jail.local

[sshd]
enabled = true
banaction = iptables-multiport
maxretry = 3
findtime = 43200
bantime = 86400
# sudo systemctl restart fail2ban

# fail2ban-client status sshd

දිරියක් වෙන්න අදහස් පෙළක් දාන්න

Post a Comment (0)
Previous Post Next Post