Fail2ban is a popular tool for securing cloud applications from brute-force attacks. It works by monitoring log files, detecting multiple failed login attempts, and automatically banning the offending IPs. For detailed information about fail2ban software you are welcome to visit the project page on github: https://github.com/fail2ban

For cloud tenants in the European Weather Cloud (EWC), Fail2ban comes preconfigured on virtual machine (VM) images, ensuring that your application is protected from malicious attempts right from the start. In EWC this is implemented as 5 consecutive failed attempts (maxretry = 5). It's worth mentioning that the ban is lifted after an hour (bantime = 1h).

To review the list of currently banned IPs you can:


Managing banned IP's:


    1. Edit Fail2ban Configuration
      Open the configuration file for the jail you want to modify (for example, SSH):
      sudo nano /etc/fail2ban/jail.local

    2. Add IPs to the ignoreip Directive
      Find the jail configuration (e.g., [sshd]), and add the IPs you wish to whitelist under ignoreip.
      Separate multiple IP addresses with spaces:
      [sshd]
      ignoreip = 192.168.1.1 203.0.113.50

    3. Restart Fail2ban to apply the changes:
      sudo systemctl restart fail2ban