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?

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

    anything visiting specific subpages without a reasonable referer is banned

    the login page is whitelisted, anything without a 200 from from login is banned if trying to access other parts (since i only care about logged in users on that app anyways)

    anything in the abuseip list is proactively banned

    certain datacenter ip ranges are blocked wholesale

    too many errors -> ban

    iocaine to make them lost in fake pages based on heuristics like user agent

    honeypot link to the iocaine maze that a regular user wont see

    ratelimits and accompanying bans if exceeded

    blacklist of user agents

    geoip banning

    had to switch to nftables to support the volume of banned ips, iptables would buckle under the load.

    • DarkCloud@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      24 hours 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
        0
        ·
        22 hours 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
          1
          ·
          14 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
            1
            ·
            7 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
          1
          ·
          14 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.