Fix actions for all the services

tags/0.0.1
Daniel Berteaud 12 years ago
parent 8b8e59de61
commit 08b187212a
  1. 4
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/25Actions
  2. 1
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service10ssh
  3. 1
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service15dovecot
  4. 4
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service25httpd
  5. 3
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service30pam
  6. 1
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service35SOGo
  7. 2
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/90Recidive

@ -1,7 +1,7 @@
action = smeserver[port="<port>", protocol=<protocol>]
{ {
our $action = "action = smeserver[port=\"<port>\", protocol=<protocol>, bantime=<bantime>]";
if (($fail2ban{'Mail'} || 'disabled') eq 'enabled'){ if (($fail2ban{'Mail'} || 'disabled') eq 'enabled'){
my $dest = $fail2ban{'MailRecipient'} || 'root'; my $dest = $fail2ban{'MailRecipient'} || 'root';
$OUT .= " sendmail[name=<name>, dest=$dest]\n"; $action .= " sendmail[name=<name>, dest=$dest]\n";
} }
} }

@ -11,6 +11,7 @@ filter = sshd
port = $port port = $port
protocol = tcp protocol = tcp
name = ssh name = ssh
$action
logpath = /var/log/sshd/current logpath = /var/log/sshd/current
EOF EOF
} }

@ -17,6 +17,7 @@ filter = dovecot
port = $port port = $port
protocol = tcp protocol = tcp
name = dovecot name = dovecot
$action
logpath = /var/log/dovecot/current logpath = /var/log/dovecot/current
EOF EOF

@ -15,6 +15,7 @@ filter = apache-overflows
port = $port port = $port
protocol = tcp protocol = tcp
name = apache-overflows name = apache-overflows
$action
logpath = /var/log/httpd/error_log logpath = /var/log/httpd/error_log
[http-noscript] [http-noscript]
@ -23,6 +24,7 @@ filter = apache-noscript
port = $port port = $port
protocol = tcp protocol = tcp
name = apache-noscript name = apache-noscript
$action
logpath = /var/log/httpd/error_log logpath = /var/log/httpd/error_log
[http-scan] [http-scan]
@ -31,6 +33,7 @@ filter = apache-scan
port = $port port = $port
protocol = tcp protocol = tcp
name = apache-scan name = apache-scan
$action
logpath = /var/log/httpd/error_log logpath = /var/log/httpd/error_log
[http-auth] [http-auth]
@ -39,6 +42,7 @@ filter = apache-auth
port = $port port = $port
protocol = tcp protocol = tcp
name = apache-auth name = apache-auth
$action
logpath = /var/log/httpd/error_log logpath = /var/log/httpd/error_log
EOF EOF

@ -2,6 +2,7 @@
[pam-generic] [pam-generic]
enabled = true enabled = true
filter = pam-generic filter = pam-generic
action = smeserver[] name = = pam-generic
$action
logpath = /var/log/secure logpath = /var/log/secure

@ -15,6 +15,7 @@ filter = sogo
port = $port port = $port
protocol = tcp protocol = tcp
name = sogo name = sogo
$action
logpath = /var/log/sogo/sogo.log logpath = /var/log/sogo/sogo.log
EOF EOF

@ -3,8 +3,8 @@
enabled = true enabled = true
filter = recidive filter = recidive
logpath = /var/log/fail2ban/daemon.log logpath = /var/log/fail2ban/daemon.log
action = smeserver[name=recidive]
bantime = 604800 bantime = 604800
findtime = 86400 findtime = 86400
maxretry = 5 maxretry = 5
backend = polling backend = polling
$action

Loading…
Cancel
Save