[SOLVED] Email sent but IP not reported

Antworten
Najihel
Beiträge: 3
Registriert: 12. Feb 2014, 09:12

[SOLVED] Email sent but IP not reported

Beitrag von Najihel » 13. Feb 2014, 15:10

Hi :)

I configured 2 machines (Shenron ID 1946 and Rambo ID 1847) for send you fail2ban logs.

But, even if logs are sent by email (I make an alias which containt fail2ban@blocklist.de and I), there isn't reports.

For information : jail.conf

Code: Alles auswählen

[DEFAULT]
ignoreip = XXX.XXX.XXX.XXX
bantime = 2592000
maxretry = 3
backend = polling
destemail = fail2ban-rambo@ituz.fr
banaction = iptables-multiport
mta = sendmail
protocol = tcp
action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]
action_mw = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]
              %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s]
action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]
               %(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath=%(logpath)s]
action = %(action_mwl)s

[ssh]
enabled = true
port    = ssh
filter  = sshd
logpath  = /var/log/auth.log
maxretry = 3

[pam-generic]
enabled = false
filter  = pam-generic
port = all
banaction = iptables-allports
port     = anyport
logpath  = /var/log/auth.log
maxretry = 3

[xinetd-fail]
enabled   = false
filter    = xinetd-fail
port      = all
banaction = iptables-multiport-log
logpath   = /var/log/daemon.log
maxretry  = 2

[ssh-ddos]
enabled = false
port    = ssh
filter  = sshd-ddos
logpath  = /var/log/auth.log
maxretry = 3

[apache]
enabled = false
port    = http,https
filter  = apache-auth
logpath = /var/log/apache*/*error.log
maxretry = 6

[apache-multiport]
enabled   = false
port      = http,https
filter    = apache-auth
logpath   = /var/log/apache*/*error.log
maxretry  = 6

[apache-noscript]
enabled = false
port    = http,https
filter  = apache-noscript
logpath = /var/log/apache*/*error.log
maxretry = 6

[apache-overflows]
enabled = false
port    = http,https
filter  = apache-overflows
logpath = /var/log/apache*/*error.log
maxretry = 2

[vsftpd]
enabled  = false
port     = ftp,ftp-data,ftps,ftps-data
filter   = vsftpd
logpath  = /var/log/vsftpd.log
maxretry = 6

[proftpd]
enabled  = false
port     = ftp,ftp-data,ftps,ftps-data
filter   = proftpd
logpath  = /var/log/proftpd/proftpd.log
maxretry = 6

[wuftpd]
enabled  = false
port     = ftp,ftp-data,ftps,ftps-data
filter   = wuftpd
logpath  = /var/log/auth.log
maxretry = 6

[postfix]
enabled  = false
port     = smtp,ssmtp
filter   = postfix
logpath  = /var/log/mail.log

[couriersmtp]
enabled  = false
port     = smtp,ssmtp
filter   = couriersmtp
logpath  = /var/log/mail.log

[courierauth]
enabled  = false
port     = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
filter   = courierlogin
logpath  = /var/log/mail.log

[sasl]
enabled  = false
port     = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
filter   = sasl
logpath  = /var/log/mail.log

[named-refused-udp]
enabled  = false
port     = domain,953
protocol = udp
filter   = named-refused
logpath  = /var/log/named/security.log

[named-refused-tcp]
enabled  = false
port     = domain,953
protocol = tcp
filter   = named-refused
logpath  = /var/log/named/security.log
Part of mail headers :

Code: Alles auswählen

Received: from rambo.local (unknown [XXX.XXX.XXX.XXX])
	by smtp6-g21.free.fr (Postfix) with ESMTP id 5234C8232B
	for <fail2ban-rambo@ituz.fr>; Thu, 13 Feb 2014 10:06:46 +0100 (CET)
Received: by rambo.local (Postfix, from userid 0)
	id 0E57F1A010C; Thu, 13 Feb 2014 10:07:06 +0100 (CET)
Subject: [Fail2Ban] ssh: banned 112.72.98.108
From: Fail2Ban <fail2ban@rambo.ituz.fr>
To: fail2ban-rambo@ituz.fr
Message-Id: <20140213090707.0E57F1A010C@rambo.local>
Date: Thu, 13 Feb 2014 10:07:05 +0100 (CET)
Where I screwed up ?

Thanks

Najihel
Zuletzt geändert von Najihel am 15. Feb 2014, 21:04, insgesamt 1-mal geändert.

Benutzeravatar
Martin
Beiträge: 397
Registriert: 14. Sep 2010, 11:54
Kontaktdaten:

Re: Email sent but IP not reported

Beitrag von Martin » 13. Feb 2014, 15:52

Hello,

the Mails from "shenron" was dropped, because we can not report the Attacks of "apache-overflows", this has to many false-positives.
From the other System, we received some Mails and parsed them, but the From-Sender is not in our Database:
fail2ban-rambo+bncBAABBA4K6KLQKGQEVXHK4ZY....@...
In this case, it is necessary to use the same from-/return-path-Sender with the Name Address under your Server-Profile.

When you use forwarding service, please disable srs, that the envelope-sender is the same Address which you have addedd in your profile.
A other way is sending the Attacks over http:
http://www.blocklist.de/en/httpreports.html
http://www.blocklist.de/en/httpreports.html?help to see example code/url to reports automatically.
Mfg Martin
http://www.blocklist.de/de/ Fail2Ban Reporting Service

Najihel
Beiträge: 3
Registriert: 12. Feb 2014, 09:12

Re: Email sent but IP not reported

Beitrag von Najihel » 13. Feb 2014, 16:33

Hi
Martin hat geschrieben:the Mails from "shenron" was dropped, because we can not report the Attacks of "apache-overflows", this has to many false-positives.
But the emails that were sent are : [Fail2Ban] ssh: banned XXX.XXX.XXX from shenron.xxxx.yy

I don't see any mail about apache-overflows
Martin hat geschrieben:From the other System, we received some Mails and parsed them, but the From-Sender is not in our Database:
fail2ban-rambo+bncBAABBA4K6KLQKGQEVXHK4ZY....@...
I configure fail2ban@blocklist.de now :)

Benutzeravatar
Martin
Beiträge: 397
Registriert: 14. Sep 2010, 11:54
Kontaktdaten:

Re: Email sent but IP not reported

Beitrag von Martin » 13. Feb 2014, 18:52

Hi Najihel,

sorry on the first look for the Subject i look at the wrong logfile-line.

Now, we received the Mails. The last Attack from 17:57:42 +0100 was parsed correctly and listed and reported.

(i see on some reporting-server the time was few minutes false -+, now i sync them via ntp).
Mfg Martin
http://www.blocklist.de/de/ Fail2Ban Reporting Service

Najihel
Beiträge: 3
Registriert: 12. Feb 2014, 09:12

Re: Email sent but IP not reported

Beitrag von Najihel » 15. Feb 2014, 21:03

Hi,

Thanks :)

[TOPIC CLOSED]

Antworten