Fail2Ban on the Raspberry Pi Part 1 - Install

preview_player
Показать описание
How to install Fail2Ban on the RaspberryPi:

Make sure that you've changed the default password:
"psswd"

Update the Raspberry Pi:
"sudo apt-get update && sudo apt-get upgrade -y"

Install Fail2Ban:
"sudo apt-get install fail2ban"

Once installed, enter the config file:

And enter something like this:
"[ssh]

enabled = true
port = ssh
filter = sshd
bantime = 900
banaction = iptables-allports
findtime = 9000
maxretry = 2"

Restart Fail2Ban:
"sudo service fail2ban restart"

And you're all set!

You can look up what IP addresses are currently banned here:
"sudo iptables -L -n --line"

BOM:

Рекомендации по теме
Комментарии
Автор

To unban: fail2ban-client set sshd unbanip IPADDRESS

alphajack
Автор

'enable=true' should be 'enabled=true'

winandd