Archive for March, 2013

Mar 14 2013

fail2ban mysql

Dodaj kod do
/usr/share/fail2ban/server/datedetector.py

# AAMMJJ HH:MM:SS
template = DateStrptime()
template.setName("YearMonthDay Hour:Minute:Second")
template.setRegex("\d{2}\d{2}\d{2} \d{2}:\d{2}:\d{2}")
template.setPattern("%y%m%d %H:%M:%S")
self.__templates.append(template)

# cat /etc/fail2ban/filter.d/mysqld.conf

Fail2Ban configuration file
#
# Author: Darel
#

[Definition]
failregex = Access denied for user ‘.*’@’