Applicable to:
- Plesk for Linux
Symptoms
-
When enabling Fail2Ban or
sshandplesk-proftpdjails 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.
-
fail2banservice 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.
Resolution
- Log in to Plesk.
- Go to Tools & Settings > IP Address Banning (Fail2Ban) > Jails tab.
-
Modify
sshjail:3.1. Click on ssh > Change Settings.
3.2. In the field Log path, replace
/var/log/auth.logwith/var/log/secure.3.3. Apply the changes.
-
Modify
plesk-proftpd:4.1. Click on plesk-proftpd > Change Settings.
4.2. In the field Log path, replace
/var/log/auth.logwith/var/log/secure.4.3. Apply the changes.
- Start Fail2Ban, if it is not started.
- Enable
sshandplesk-proftpdjails.
- Log in to Plesk.
- Go to Tools & Settings > IP Address Banning (Fail2Ban) > Jails tab.
-
Modify
sshjail:3.1. Click on ssh > Change Settings.
3.2. In the field Log path, replace
/var/log/securewith/var/log/auth.log.3.3. Apply the changes.
-
Modify
plesk-proftpd:4.1. Click on plesk-proftpd > Change Settings.
4.2. In the field Log path, replace
/var/log/securewith/var/log/auth.log.4.3. Apply the changes.
- Start Fail2Ban, if it is not started.
- Enable
sshandplesk-proftpdjails.
Comments
Please sign in to leave a comment.