Articles in this section

Activation of plesk-proftpd and ssh jails fail in Fail2Ban for Linux: Have not found any log file for ssh jail

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • When enabling Fail2Ban or ssh and plesk-proftpd jails in Plesk, the operation fails with one of the following error messages:

    PLESK_ERROR: ERROR Failed during configuration: Have not found any log file for ssh jail
    ERROR:__main__:Command '['/usr/bin/fail2ban-client', 'reload', '--if-exists', 'ssh']' returned non-zero exit status 255.
    ERROR:__main__:Failed to reload following jails due to errors in configuration: plesk-proftpd, ssh.

    PLESK_ERROR: Could not enable jails: To be able to activate a jail, switch on Fail2Ban first.

  • fail2ban service status returns these messages:

    # service fail2ban status
    ... 
    plesk fail2ban-server[7688]: fail2ban [7688]: ERROR Failed during configuration: Have not found any log file for ssh jail 
    plesk fail2ban-server[7688]: fail2ban [7688]: ERROR Async configuration of server failed

Cause

Incorrect log path is specified in Fail2Ban ssh and plesk-proftpd jails.

mceclip0.png
 

Resolution

For Plesk on AlmaLinux / CloudLinux / RHEL
  1. Log in to Plesk.
  2. Go to Tools & Settings > IP Address Banning (Fail2Ban) > Jails tab.
  3. Modify ssh jail:

    3.1. Click on ssh > Change Settings.

    3.2. In the field Log path, replace /var/log/auth.log with /var/log/secure.

    3.3. Apply the changes.

  4. Modify plesk-proftpd:

    4.1. Click on plesk-proftpd > Change Settings.

    4.2. In the field Log path, replace /var/log/auth.log with /var/log/secure.

    4.3. Apply the changes.

  5. Start Fail2Ban, if it is not started.
  6. Enable ssh and plesk-proftpd jails.
For Plesk on Debian / Ubuntu
  1. Log in to Plesk.
  2. Go to Tools & Settings > IP Address Banning (Fail2Ban) > Jails tab.
  3. Modify ssh jail:

    3.1. Click on ssh > Change Settings.

    3.2. In the field Log path, replace /var/log/secure with /var/log/auth.log.

    3.3. Apply the changes.

  4. Modify plesk-proftpd:

    4.1. Click on plesk-proftpd > Change Settings.

    4.2. In the field Log path, replace /var/log/secure with /var/log/auth.log.

    4.3. Apply the changes.

  5. Start Fail2Ban, if it is not started.
  6. Enable ssh and plesk-proftpd jails.
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.