I have owncloud in apache behind nginx. I try to ban bad guys by Fail2ban in nginx server. All is ok, log comes from owncloud, with real IP, and is reading by fail2ban. But all is missed all the time… I try many regex but with no results.
The line of log Feb 27 21:01:19 OWNCLOUD1 ownCloud[30242]: {core} Login failed: ‘xxxx.xxxx@xxx-xxx-xxx.com’ (Remote IP: ‘xx.xx.xx.xx’)
I try a lot, The last ‘.’ Login failed: '.’ (Remote IP: '<HOST>) ‘.*’
It’s not my first fail2ban, but… Thanks a lot for your response.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Ok I find the correct regex failregex = .: {core} Login failed: '.’ (Remote IP: ‘<HOST>’)
Hi @globo
probably you should use something like the following:
failregex = ^.*Login failed.*Remote IP:.<HOST>..*$
Hi theMiddle, thanks for your quick response But always trouble after I have changed owncloud.conf in filter.d,
Use failregex filter file : owncloud, basedir: /etc/fail2ban Use log file : /var/log/clients/OWNCLOUD1.xxx-xxx-xxx.com/syslog.log Use encoding : UTF-8
Failregex: 0 total
Ignoreregex: 0 total
Date template hits: |- [# of hits] date format | [341] (?:DAY )?MON Day 24hour:Minute:Second(?:.Microseconds)?(?: Year)? `-
Lines: 341 lines, 0 ignored, 0 matched, 341 missed [processed in 0.02 sec]
but i verify in the log file, Mar 1 08:42:23 OWNCLOUD1 ownCloud[34887]: {core} Login failed: ‘essai’ (Remote IP: ‘xxx.xxx.xxx.xxx’)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.