Hey Matt, finally got around to installing your module on a production website where I found myself going back and forth between the watchdog and the IP address blocking UI and wishing for a better workflow.
It's great! I love the fact that the Ban label changes to Unban for sites already on the banned list - nice touch!
When you witness Nice it's hard not to wish for Nicer, right? :-)
I'm thinking that it would be awesome to be able to use Rules to create complex conditions for banning/unbanning.
If it's doable, I'm game. Where would be a good place to start?
Comments
Comment #2
mparker17@bisonbleu, thanks for the positive feedback! I'm happy to hear that you find this module useful!
Regarding Rules integration, I believe that one of the recent versions of Rules added a Block IP address action (#2219055: Add a 'block IP address' action), so you should already be able to do simple rules which result in an IP address being banned.
You might also want to check out my Blocked IPs Expire module, which provides a rules action which blocks an IP address for a certain amount of time, allows you to assign an expiry date to IP addresses already in the system, and automatically assign new bans expiry dates. Although, I have not yet had a chance to test dblog_ban and blocked_ips_expire together yet (#2843348: Integrate with blocked_ips_expire), so if you can do that, that would be great.
I have a few more (currently rather hazy) ideas for more rules triggers, conditions, and actions that could be used to provide a Rules-based, configurable, automated "security system"; but I'm not sure any of them would belong in this module in particular (I'm a big fan of the "do one thing really well" UNIX philosophy, partly because I don't have much free personal time for maintenance of large projects). I will look into publishing these ideas somewhere so that other people can act on them faster than I can find free time for personal projects.
Eventually, I would like to see an "Unblock IP address" action patched into Rules core as well. From what I can see from the Rules issue queue, right now an issue does not exist to do this, so feel free to add it and link to it here.
If you want to help out this module, the main thing I want to do is add tests (#2826934: Add automated tests), so that things don't regress as the module gets more complex. Eventually, I would also like to smooth out the Ban / Unban workflow a bit (#2843337: Provide an option for Flag-like AJAX links) too.
I am also looking to port this module to Drupal 8 (#2843351: Port to Drupal 9 and 10).
Comment #3
goodboy commentedSorry, I made my first module Automatic IP ban for drupal.org, which uses a log for the ban. I waited a long time check, the module has appeared in the middle of this summer. I recently learned about your module, my module developed independently from yours. It would be interesting to know your opinion about my module. I just use my own rules to ban IP addresses.
Comment #4
mparker17@goodboy, I did not know about
autoban! Thanks for letting me know!All that
dblog_bandoes is add a "ban" or "unban" link to the list of database logs at/admin/reports/dblogso that administrators can manually ban or unban IP addresses. This does not conflict with the functionality ofautoban, which lets administrators set rules which will automatically trigger a ban by analyzing a database log message.As mentioned in #2, I was looking to make some sort of automated security system eventually. I had an idea for something like
autoban, but I haven't had the chance to write any code yet. Expect some contributions from me in the future :DComment #5
goodboy commentedThank you for your answer. I think that Drupal community does not need a duplicated functional modules. And we need to go your way. Good thing between us is not planned combat operations )). I actively use my module in my projects, and I hope that it will be useful to others.