Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th March 2012, 00:33
freshfitz freshfitz is offline
Junior Member
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Fail2ban apache driving me crazy

I am trying to log failed attempts from an .htpasswd file. i want the failed attempts to be emailed to me. It is working for failed ssh logins. It seems like fail2ban is reading my log file entries???? I'm lost on why it won't email me

jail.conf

Code:
[apache]

enabled = true
filter  = apache-auth
action  = sendmail-whois[name=ApacheDeny, dest=george@abc.com]
logpath = /var/log/phpmyadmin.log
maxretry = 2
apache-auth.conf
Code:
[Definition]

# Option:  failregex
# Notes.:  regex to match the password failure messages in the logfile. The
#          host must be matched by a group named "host". The tag "<HOST>" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values:  TEXT
#
#failregex = [[]client <HOST>[]] user .* authentication failure
#            [[]client <HOST>[]] user .* not found /
#            [[]client <HOST>[]] user .* password mismatch

failregex = [[]client <HOST>[]] user .* not found

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =
log file

[Sat Mar 03 18:27:01 2012] [error] [client 74.4.4.4] user asfadsfasf not found: /
[Sat Mar 03 18:27:03 2012] [error] [client 74.4.4.4] user asfsadfdsfad not found: /
[Sat Mar 03 18:27:08 2012] [error] [client 74.4.4.4] user ffffffff not found: /
[Sat Mar 03 18:27:10 2012] [error] [client 74.4.4.4] user ffffffff not found: /


result of test - fail2ban-regex /var/log/phpmyadmin.log "[[]client <HOST>[]] user .* not found"

Results
=======

Failregex
|- Regular expressions:
| [1] [[]client <HOST>[]] user .* not found
|
`- Number of matches:
[1] 4 match(es)

Ignoreregex
|- Regular expressions:
|
`- Number of matches:

Summary
=======
Reply With Quote
Sponsored Links
  #2  
Old 4th March 2012, 00:52
freshfitz freshfitz is offline
Junior Member
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I had my stupid ip whitelisted
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sessions not being saved gavimobile General 6 15th January 2012 15:05
fail2ban is doing nothing? rlischer Server Operation 16 29th June 2010 07:29
trying to install roundcubemail ressel Installation/Configuration 13 24th December 2009 20:13
problems with suexec gobokster Installation/Configuration 7 7th May 2009 13:33
CENTOS 5 Ping Problem gAnDo Server Operation 11 28th March 2008 20:58


All times are GMT +2. The time now is 20:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.