I personally use nginx-ultimate-bad-bot-blocker but also custom IP ranges (the entirety of Israel plus GAFAM), and fail2ban.

I saw a dramatic drop in scraper-related traffic, although I still have some offenders trying to access (and failing in doing so).

Which solution do you use?

  • DarkCloud@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 day ago

    anything visiting specific subpages without a reasonable referer is banned

    I’m a passer by, won’t that capture people who paste links?

    • JustTesting@lemmy.hogru.ch
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      It depends on the page. Like no normal user will bookmark or paste a /login url. The only time a user ends up there is when pressing the login button or when they were accidentaly logged out. So it’s a pretty reliable signal. And there’s usualls a lot of pages a user will not go to directly. Like who bookmarks a TOS page?

      • dropdrip@lemmy.ml
        link
        fedilink
        English
        arrow-up
        6
        ·
        18 hours ago

        This has been an issue for me–people making assumptions about how normal users operate their computers. Their is a norm, but by blocking deviations you’re just blocked those that deviate–bots and people.

        I bookmark terms-of-service pages to read and re-read them. I manually type URLs of login pages. I occasionally browse the web whilst refusing to download media as I desire a purely textual experience.

        Images have a lot of power and are a vector of manipulation that we can’t guard against–it’s how we have evolved as a species. That vector is abused by advertisers specifically, but the images on a site do effect the context of the text as well. Strip away everything but the text and you’re dramatically hindering the author’s ability to persuade the reader emotionally.

        I’m not complaining and I do advise operators to do all that they can to prevent abuse of their services, but I’d just like to point out that the norm exists because the deviations exist too. Not serving those users is just collateral whilst blocking abusive actors.

        I can’t think of a better way to prevent abuse either. Encryption and strong user-authentication are my preferred tools at preventing abuse, but that sort of thing is not designed for a public website whose purpose is to provide a commons to users.

        • JustTesting@lemmy.hogru.ch
          link
          fedilink
          English
          arrow-up
          3
          ·
          12 hours ago

          The irony of all of this is that there’s like 5 people replying to me making assumptions when they have no idea what the circumstances are.

          I run a lemmy server, on pretty low power hardware, with closed registrations, that serves like 5 users, which is mostly friends. It has to be open to the internet, because lemmy. Other lemmy instances are whitlelisted, so federation works without problem. It does not have to serve anyone other than those 5 users. No one besides those 5 users can create an account, there’s tons of other lemmy instances better suited for random users, plus I don’t owe anyone other than my users anything. LLM scrapers have considerably harmed uptime/reachability of the instance in the past, going from like 99.9% to 96%, before introducing the very aggressive blocking. All the things I outlined in my original post helped significantly in reducing that traffic and actually making the instance work for those 5 users.

          You’re not one of my normal users, since you’re not one of my users at all. It is really ironic how everyone here jumps to conclusions that I’m like blocking half of the internet from accessing essential services or something. The original post was about how to completely block LLM scrapers. The referer rules get rid of about 30% of LLM scraper traffic in my case. Your mileage may vary, check what makes sense for your case. But all the comments here are like peak lemmy…

      • ExtraJudgement@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        19 hours ago

        Like no normal user will bookmark or paste a /login url.

        Guess I’m not “normal”. All the login pages for relevant services are bookmarks on my gethomepage.dev.

      • nacho@charla.gamingnight.uy
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        I don’t know, especially for sites where I don’t care at all for the unauthenticated site, I have bookmarked login pages. Although it’s true that most times I bookmark the dashboard/home/whatever and get redirected to login.

        • JustTesting@lemmy.hogru.ch
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          1 day ago

          I’m not saying this is a catchall solution for everything. If you have a business with tens of thousands of users, sure. If you have 5 users that you know, it works very well. An the login page example is the latter case.

          It’s just a pattern i noticed, a lot of crawlers don’t set a referer, so that can serve as a signal, depending on circumstances.

          It also depends on your tolerance? Some false positives can be acceptable.

          Ever since those fucks started using residential proxies, you either allow them or you have to accept that you might block legitimate users. And in this specific case, those kinds of rules definitely make my life easier and if that means someone legit can’t access it, well, it’s best effort and I don’t have an obligation to make things work for everyone. it sucks and I wish the internet wasn’t like this nowadays. But the measures i described helped cut down thousands of requests/second to maybe 1-3. Most of those are likely still crawlers, but there’s only so much effort i am willing to spend to fight corporations with tens of thousands of times the manpower. If this is ever not enough, i’ll just shut things off tbh.

          P.s. i should also mention that i validated all of my rules against access logs covering a long-ish period of time and i did not see any false positives.