How to install fail2ban on Amazon Linux
Daemon to ban hosts that cause multiple authentication errors
Availability
Compare package tracks by distribution and architecture. Checkmarks show the architectures available in each repository channel.
| Distro | Channel | noarch | Version |
|---|---|---|---|
| Amazon Linux 2 | Base | 0.11.2 |
Description
Fail2Ban scans log files and bans IP addresses that makes too many password failures. It updates firewall rules to reject the IP address. These rules can be defined by the user. Fail2Ban can read multiple log files such as sshd or Apache web server ones. Fail2Ban is able to reduce the rate of incorrect authentications attempts however it cannot eliminate the risk that weak authentication presents. Configure services to use only two factor or public/private authentication mechanisms if you really want to protect services. This is a meta-package that will install the default configuration. Other sub-packages are available to install support for other actions and configurations.
Built for Amazon Linux.
Install
fail2ban on Amazon Linux 2
sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm sudo dnf -y install fail2ban
Package downloads require an active GetPageSpeed subscription — one repository for fail2ban and thousands more packages for Amazon Linux.
Subscribe — from $10/moFrequently asked questions
How do I install fail2ban on Amazon Linux?
Add the GetPageSpeed repository, then install the fail2ban package with your system package manager.
Which Amazon Linux versions is fail2ban available for?
fail2ban is available for Amazon Linux 2.