https://bugs.contribs.org/show_bug.cgi?id=10370
Bug ID: 10370
Summary: NFR modify remaining static jail templates to allow
configuration using db variables
Classification: Contribs
Product: SME Contribs
Version: 9.2
Hardware: ---
OS: ---
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: smeserver-fail2ban
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
(If this sounds like a good idea, I'll work up and attach new template
fragments.)
It seems that it would be easy to modify the remaining static jail.conf
template fragments to use optional db variables for customization.
One example would be changing 90Recidive from this:
[recidive]
enabled = true
filter = recidive
logpath = /var/log/fail2ban/daemon.log
bantime = 604800
findtime = 86400
maxretry = 5
backend = polling
action = smeserver-iptables[bantime=604800]
{
$OUT .= " smeserver-sendmail[name=\"Recidive\",dest=$maildest]\n"
if ($mail eq 'enabled');
$OUT .= '';
}
To something like this (defaulting to all current values)
{
my $enabled = $recidive{'f2b_status'} || 'true'
my $filter = $recidive{'f2b_filter'} || 'recidive'
my $logpath = $recidive{'f2b_logpath'} || '/var/log/fail2ban/daemon.log'
my $bantime = $recidive{'f2b_bantime'} || '604800'
my $findtime = $recidive{'f2b_findtime'} || '86400'
my $maxretry = $recidive{'f2b_maxretry'} || '5'
my $backend = $recidive{'f2b_backend'} || 'polling'
my $action = $recidive{'f2b_action'} || 'smeserver-iptables[bantime=' .
$bantime . ']'
$OUT .=<<"EOF";
[recidive]
enabled = $enabled
filter = $filter
logpath = $logpath
bantime = $bantime
findtime = $findtime
maxretry = $maxretry
backend = $backend
action = $action
EOF
{
$OUT .= " smeserver-sendmail[name=\"Recidive\",dest=$maildest]\n"
if ($mail eq 'enabled');
$OUT .= '';
}
--
You are receiving this mail because:
You are the QA Contact for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/