Fail2ban does not works after ISPConfig autoinstall

Discussion in 'Installation/Configuration' started by natanfelles, Jun 1, 2023.

  1. natanfelles

    natanfelles New Member

    Hello!
    After install ISPConfig with the autoinstaller, fail2ban does not start.
    This is the log:
    Code:
    # systemctl status fail2ban
    × fail2ban.service - Fail2Ban Service
         Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Wed 2023-05-31 23:25:38 UTC; 2s ago
           Docs: man:fail2ban(1)
        Process: 19721 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION)
       Main PID: 19721 (code=exited, status=255/EXCEPTION)
            CPU: 259ms
    
    May 31 23:25:38 bizu systemd[1]: Started Fail2Ban Service.
    May 31 23:25:38 bizu fail2ban-server[19721]: 2023-05-31 23:25:38,807 fail2ban                [19721]: ERROR   Failed during configuration: Have not found any log file for sshd jail
    May 31 23:25:38 bizu fail2ban-server[19721]: 2023-05-31 23:25:38,813 fail2ban                [19721]: ERROR   Async configuration of server failed
    May 31 23:25:38 bizu systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
    May 31 23:25:38 bizu systemd[1]: fail2ban.service: Failed with result 'exit-code'.
    
    To solve this, I updated the /etc/fail2ban/jail.conf file:
    Code:
    #backend = auto
    backend = systemd
    My question is whether this is correct and whether it could be added to be automatically updated by the autoinstaller.
    Thank you!
     
    ahrasis likes this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    As far as I can see, this is not an issue with the auto-installer but with your base system image. Your system does not seem to write log files, which it normally should do. probably the person that set up this base system image uninstalled rsyslog. Try:

    ap install rsyslog

    and change back the fail2ban settings.
     
    natanfelles likes this.
  3. natanfelles

    natanfelles New Member

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, thank you. I'll re-check the minimal setup guide.
     
    natanfelles likes this.

Share This Page