YunoHost-Apps / dokuwiki_ynh

Dokuwiki package for YunoHost
https://www.dokuwiki.org/dokuwiki
GNU General Public License v3.0
11 stars 16 forks source link

Added Fail2ban for Dokuwiki #44

Closed anmol26s closed 5 years ago

anmol26s commented 5 years ago

Problem

Solution

PR Status

Validation


Minor decision

anmol26s commented 5 years ago

This needs to be tested. Works for me. And maybe regular expression could be made more sophisticated.

maniackcrudelis commented 5 years ago

Looks good, but need to be tested.

frju365 commented 5 years ago

We need to set up a test on the dev CI.

anmol26s commented 5 years ago

Works for me on root.

maniackcrudelis commented 5 years ago

Works for me on root.

Are you sure this feature is working ? I've just tested it, dokuwiki isn't logging anything in nginx log ! And actually, there's a plugin made for that purpose, but it's currently broken.

Plugin logautherror, and the current PR which is suppose to fix it.

anmol26s commented 5 years ago

@maniackcrudelis You might had checked access log for the domain. The error is reported in nginx-error log of the domain. https://github.com/YunoHost-Apps/dokuwiki_ynh/pull/44/commits/70d8aea655dc578370b16f21ecd41bd7b4d31cd1#diff-ad962c6fd65b725b71aa46c8a715127fR218

maniackcrudelis commented 5 years ago

Definitively not, there's no errors log both in access or error log of the domain. I can try many times to crack the password, more than 5 for sure. And finally with the right password I logged in. So, fail2ban isn't working. I think you should have a look to this plugin.

anmol26s commented 5 years ago

@maniackcrudelis You are right. My instance have plug-in which debugs authenticate log in the error log. On fresh install it fails. How is Ldap plug-in installed while install. Just coping the plug-in files in the /var/www/dokuwiki/lib/plugin will do?

maniackcrudelis commented 5 years ago

Looks like you can simply add a plugin into the directory. https://www.dokuwiki.org/plugin_installation_instructions#manual_instructions

Gofannon commented 5 years ago

I tried to automate the process of installing manually a plugin too but failed to make it run. You could have a look at the code and get some inspiration from it if you want. https://github.com/YunoHost-Apps/dokuwiki_ynh/pull/41/commits/fb981af6d5a6222e0ae7b72921154e3e9642e7d3#diff-f4cb58d611768251d0096887553342f8R54

Also, while upgrading the app, all existing plugins are upgraded so you can have a look in the upgrade script

maniackcrudelis commented 5 years ago

Fixed and tested. Got banned after 5 attempts.

Can be reviewed

kay0u commented 5 years ago

Can be merged in 3 days