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
    11
    ·
    16 hours 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
      2
      ·
      5 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
        1
        ·
        3 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?

        • nachoA
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 hours 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
            55 minutes 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.

    • Vietconga@scribe.disroot.orgOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      14 hours ago

      After reading this comment I think I will lift muy web camp and move entirely to Gopher. Too much of a hassle for just a tiny blog.

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

        Might I interest you in Gemini? The protocol, not googles llm. It’s like gopher in many ways, just more recent and comfortably active (in that you can read all there is in a day and be done with it, but there is stuff regularily).