From: Steven H. <ste...@hi...> - 2013-12-31 16:54:06
|
On 31/12/13 16:40, Michael Weber wrote: > Greetings! > I am installing fail2ban on about 170 CentOS servers. I am looking for > a way to 1) have a single configuration across all the servers, and 2) > have the email subject line tell me the host name that the alert is > coming from. > Is there a way to include the $HOSTNAME environment variable in the > email subject line? > Or, is there another way to accomplish this? > Thanx! > -Michael Weber > The current send mail action calls `uname -n` to add the hostname to the subject line. This may not be in your version(?) but it's easy enough to add if not. See: https://github.com/fail2ban/fail2ban/blob/master/config/action.d/sendmail.conf#L17 In terms of a single configuration across servers, you can use the `-c` flag with fail2ban-client to specify the configuration folder. You could use this to point to a network share folder with the config inside… -- Steven Hiscocks |