Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http badbots #1242

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Http badbots #1242

wants to merge 2 commits into from

Conversation

sebres
Copy link
Contributor

@sebres sebres commented Nov 2, 2015

new apache/nginx jail and filter http-badbots - (previously apache-badbots) common filter to ban bad-bot hosts for apache/nginx (catches known spambots and software alike);
See gh-712

Based on #1241 because init definition of this filter can be extended using own regex, example:

[nginx-badbots]
filter = http-badbots[badbots="SomeBadBot|<known/badbots>"]

or

[nginx-badbots]
filter = http-badbots[badbots=ThisBadBotOnly, badbotscustom=ThisBadBotOnly]

@sebres sebres mentioned this pull request Nov 2, 2015
@yarikoptic
Copy link
Member

So is this one extension to previously contributed handling of 'known' within config files? (and somewhat of a fix for #875)?

@@ -285,8 +285,10 @@ def getOptions(self, pOpts):

if self.has_section("Init"):
for opt in self.options("Init"):
v = self.get("Init", opt)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use more descriptive names, e.g. "init_opt_value" here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v will be use in 2 lines below. Please let such easy code fixing not as a hand brake for such PR's again. I mean you have apparently no problem with the opt above...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will just do it myself after the merge if that is so much effort

On November 2, 2015 5:32:07 PM EST, "Serg G. Brester" notifications@github.com wrote:

@@ -285,8 +285,10 @@ def getOptions(self, pOpts):

     if self.has_section("Init"):
         for opt in self.options("Init"):
  •            v = self.get("Init", opt)
    

v will be use in 2 lines below. Please let such easy code fixing not
as a hand brake for such PR's again. I mean you have apparently no
problem with the opt above...


Reply to this email directly or view it on GitHub:
https://github.com/fail2ban/fail2ban/pull/1242/files#r43693041

@sebres
Copy link
Contributor Author

sebres commented Nov 3, 2015

amend b0f3dfc

@yarikoptic
Copy link
Member

@sebres I guess this one needs master merged to account for already introduced known/ handling... and then refreshed review?

@sebres
Copy link
Contributor Author

sebres commented Jan 8, 2016

And I fear, I will need to do a little fix inside...

@sebres sebres self-assigned this Jan 8, 2016
@sebres sebres force-pushed the master branch 5 times, most recently from fe8a9d2 to 9d77fb2 Compare November 3, 2020 14:38
@yarikoptic
Copy link
Member

should this be let RiP @sebres ?

sebres and others added 2 commits November 26, 2023 14:56
…dbots) common filter to ban bad-bot hosts for apache/nginx (catches known spambots and software alike), see fail2bangh-712;
@sebres
Copy link
Contributor Author

sebres commented Nov 26, 2023

Rebased and resolved conflicts (all changes on known-mimic has seemed being already implemented in other branches, so only filter and changelog going here). I must think about it a bit, let us safe this firstly for a while (I'll block it right now).
However I don't like such weak filters at all, especially filters for accesslog (due to parasitic log-traffic), so I am almost for RIP of all them, but this PR can be considered as an example for creation of generic common filters. Probably I normalize all that apache/nginx stuff we have to a single filter.

@sebres sebres marked this pull request as draft November 26, 2023 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants