• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Plesk 12 - fail2ban logging

Ed_Greenberg

New Pleskian
I have many Centos 6 based Plesk 12 servers. On most of them, fail2ban logs are always 0, and fail2ban entries go to /var/log/messages.

On a few of them, fail2ban messages go to both fail2ban.log and messages.

Comparing two of these servers that exhibit the two behaviors above, I find that both rsyslog.conf have the same sum, both fail2ban.conf have the same sum, and both rsyslog.d directories are empty.

Looking at the fail2ban source, the log facility is hardwired to 'daemon', while the priority is set to INFO in both of the fail2ban.conf files.

I can't find a difference in syslog or fail2ban that would account for this difference in behavior, and most clients would like a separate fail2ban log, since Plesk offers to display it under Tools and Settings | Fail2ban | Logs.

Can anybody help?
 
It seems you have installs from different locations. Its not really hardwired in code, that's just there in case nothing is set in the config.

All my installs are from the centos 6 64 bit epel repositry. Version 0.8 of fail2ban had a seperate logfile, in 0.9 it is logged in syslog.

my /etc/fail2ban/fail2ban.conf has (again epel rpm, don't know about other rpm's or the default config distributed with source etc...)


# Option: logtarget
# Notes.: Set the log target. This could be a file, SYSLOG, STDERR or STDOUT.
# Only one log target can be specified.
# If you change logtarget from the default value and you are
# using logrotate -- also adjust or disable rotation in the
# corresponding configuration file
# (e.g. /etc/logrotate.d/fail2ban on Debian systems)
# Values: [ STDOUT | STDERR | SYSLOG | FILE ] Default: STDERR
#
logtarget = SYSLOG

Just change/add it to the config and create and empty log file.
Don't forget to configure log rotation when you change it to its own log file and make sure the fail2ban deamon has permission to wright to the file.

regards
Jan
 
Back
Top