TITLE:
Strict plausibility test prevents adding additional jails to fail2ban
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:Onyx 17.8
CentOS 7.5
PROBLEM DESCRIPTION:CentOS 7.5
Splitting Fail2Ban jails into different letter jails fails, because Plesk in 17.8 does not allow re-using the "action" name in different jails. However, using the same action name in different jails is a proper method that is allowed by and works with Fail2Ban.
This was previously possible and is an important thing to do. The reason why it is needed is that on systems with many domains, a single jail cannot handle all domains. So we create jails for each alphabet letter like
plesk-apache-a
plesk-apache-b
plesk-apache-c
...
to handle the corresponding domains that start with that letter.
STEPS TO REPRODUCE:This was previously possible and is an important thing to do. The reason why it is needed is that on systems with many domains, a single jail cannot handle all domains. So we create jails for each alphabet letter like
plesk-apache-a
plesk-apache-b
plesk-apache-c
...
to handle the corresponding domains that start with that letter.
On the console run this command to try to create a new jail "plesk-apache-a":
echo "[[\"usedns\",\"no\"],[\"logpath\",\"\\/var\\/www\\/vhosts\\/system\\/$i*\\/logs\\/error_log\"],[\"enabled\",\"true\"],[\"filter\",\"apache-auth\"],[\"maxretry\",\"6\"],[\"__source__\",\"jail.d\\/plesk.conf\"],[\"action\",\"iptables-multiport[name=apache, port=\\\"http,https,7080,7081\\\"]\"],[\"ignoreip\",\"127.0.0.1\/8 123.123.123.123\"],[\"bantime\",\"600\"],[\"destemail\",\"$admin_email\"],[\"findtime\",\"600\"],[\"backend\",\"auto\"]]"|/usr/local/psa/admin/bin/f2bmng --set-jail plesk-apache-a
ACTUAL RESULT:echo "[[\"usedns\",\"no\"],[\"logpath\",\"\\/var\\/www\\/vhosts\\/system\\/$i*\\/logs\\/error_log\"],[\"enabled\",\"true\"],[\"filter\",\"apache-auth\"],[\"maxretry\",\"6\"],[\"__source__\",\"jail.d\\/plesk.conf\"],[\"action\",\"iptables-multiport[name=apache, port=\\\"http,https,7080,7081\\\"]\"],[\"ignoreip\",\"127.0.0.1\/8 123.123.123.123\"],[\"bantime\",\"600\"],[\"destemail\",\"$admin_email\"],[\"findtime\",\"600\"],[\"backend\",\"auto\"]]"|/usr/local/psa/admin/bin/f2bmng --set-jail plesk-apache-a
ERROR:__main__:Iptables action with name="apache" already exists in jail plesk-apache
EXPECTED RESULT:Jail "plesk-apache-a" should be added without error message.
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:Confirm bug