Replying to an earlier post

As soon as an IP is determined to be malicious, subsequent pageloads result in a single query to match the IP and they get dumped to a 403 static error.

With the bots that hammer a site looking for the top 1,000 or so exploitable URLs or partake in speed scraping, this has worked wonders for my server load. I catch them in their 1st-5th page load and the rest just result in basically no effort on the part of the script.

imageimage

Replying to an earlier post

Another example expanding on my previous comment.

This IP from Hong Kong hit my site over 5,000 times in a couple minutes. The first 12 page loads were legitimate URLs and got served. On their first exploit attempt, they were blocked and the remaining 4,98x page loads were no-effort 403s. This type of thing has made it possible for me to have a cheap public-facing site as I wouldn’t be able to afford an endless array of malicious IPs doing this day in and day out. Before I went this route, I would have to shut the site down during high impact periods of these visitors as they’d corrupt and crash the database.

imageimage

Replying to an earlier post

For onlookers:

https://geminiprotocol.net/

Gemini is a new internet technology supporting an electronic library of interconnected text documents. That’s not a new idea, but it’s not old fashioned either. It’s timeless, and deserves tools which treat it as a first class concept, not a vestigial corner case. Gemini isn’t about innovation or disruption, it’s about providing some respite for those who feel the internet has been disrupted enough already. We’re not out to change the world or destroy other technologies. We are out to build a lightweight online space where documents are just documents, in the interests of every reader’s privacy, attention and bandwidth.

Replying to @⁨mo_lave@reddthat.com⁩

I run a DaaS product Trace Jobs that serves job posting data.

My expectations are pretty low and am never disappointed. Self-hosting can be pretty affordable.

kaleh.netTrace — Jobs Core API- Structured Job Posting Data Without ScrapingStructured job posting data from 38,000+ machine‑readable feeds. No scraping, no parsing, no drift. Daily updates with clean Schema.org fields for AI, analytics, and job platforms.

Replying to an earlier post

Lemmy is particularly susceptible. Hosting a static site with a limited number of pages is fine. But Lemmy needs to check all posts, find the votes, sort them, and compile the page. It does that for practically every page load, and so loading a page once is quite “expensive”.

Then add on to that the almost unlimited pages of content for bots to crawl through, bots just get caught endlessly scraping pages. Even powerful servers struggle, which is why most Lemmy instances have implemented some sort of protection against bots.

Replying to an earlier post

No it’s not, it was more of a tangential comment.

I think this is the photography site he’s talking about.

He mentioned “so many scrapers hit my site that it saturated my upload with generated content feeding the them.” which seemed unusual to me. I’m not sure why such a site would have a public upload. It doesn’t feel like a site that would have a technical challenge with the scrapers, but I also get the impression the main issue is the thought of hosting all his photos just for AI scrapers to train their image generation models.

Replying to an earlier post

Sounds like 4chan rolled their own server-side page cache. It probably made more sense for 4chan to do that then, back when the internet was still pretty new.

Nowadays there are a few packages that perform a similar function, like Varnish. Varnish picks up requests from the internet and where possible, it returns the response as static HTML from its own cache.

There’s also other types of caching at different stages of the request lifecycle that already reduce the gap between dynamic and static website performance.

Replying to an earlier post

Lemmy is built as a separate web app and back end that communicate via APIs. It makes it easy to support apps and alternate web interfaces, unlike Piefed which only started adding an API reasonably recently and doesn’t have a fraction of the eco system that Lemmy has.

But I think an important part is that Lemmy is explicitly customised for users. While bots are getting the same logged out version, the intent of Lemmy is not to be scraped by bots but it’s to be custom for each user. You’re supposed to log in, subscribe to communities you like, block people you don’t like, and have posts you’ve already seen hidden (if you set this in your settings).

Serving a custom page to each user based on their settings, blocks, and subscriptions isn’t really suited to static pages.

Replying to @⁨veniasilente@lemmy.dbzer0.com⁩

I dont believe it is that easy to tell if an IP is coming from a data center, unfortunately. To some extent you can tell its location with the geolocation database, but that is not authoritative and can be wrong or even contain intentional falsehoods. You can also see what is adjacent to it and make guesses that way, but that is often inconclusive due to common tunneling protocols like MPLS.

I believe the only remotely accurate way to tell if a connection is a bot is to use modules that detect bot behavior and redirect what it detects. Some users have even made infinitely recursive “traps” for bots that do not respect their robots.text file, which make their web page seem infinite so it scrapes forever over these fake pages that are less work to host than they are for the bot to parse through.

It is a very tough problem with few easy solutions. It will likely result in an arms race much like ads and ad blockers, hackers and firewalls, etc. It has so far, anyway.

Replying to @⁨Dave@piefed.nz⁩

I mean, adding the IP filter means you are getting a number of bots filtered out by a very simple decision making (originating IP address/segment) even before you have to apply any further processing, so it’s still an advantage even if that filter by itself only removes a non-majority portion of bot traffic. It means you are left with more / better processing capacity to filter the rest.

Replying to an earlier post

I guess the problem is that you’ve gotta be super careful. If you just block all data centres, you won’t be able to federate with most of the fediverse. It’s got to only be applied to the front end website, not to the API and especially not to the federation endpoints.

Tools like Anubis do the filtering pretty well anyway. Some 75% of traffic we get to the website is blocked without even getting a challenge, because of their list of IPs, user agents, etc.

Replying to an earlier post

Ultimately this has been a recent-ish problem, and Lemmy simply doesn’t have this sort of function yet. It’s a goo thought, though.

As the other commenter said, bad bots are not easy to tell. OpenAI, Anthropic, etc identify themselves so are easier to block. They also tend to respect a robots.txt. The issue is the b=bots that don’t limit themselves, and route through hundreds of residential IPs. You literally see dozens of IPs all with approximately the same number of requests, like 80,000 per IP. If you block them they route through others. They seem to have an endless number of residential IPs to route through, presumably due to the things you see on Lemmy about the TV apps that proxy traffic even when the TV is off. I notice a lot via South American or South East Asian countries, which lead me to suspect at least some of these residential IPs are proxying through compromised devices that might not have up to date security patches available.

Replying to @⁨Dave@piefed.nz⁩

All the logged-out views in Lemmy should be cached, otherwise you’re going to have scalability problems. edit: you can probably do this without even touching the Lemmy code. There’s already nginx serving lemmy.ca, which can be configured to cache it and respect the Vary header. (I suspect the admins are already way ahead of me here, but I just wanted to share the general approach, which is pretty universal.)

Replying to @⁨mo_lave@reddthat.com⁩

I host tons of open source projects on forge.sciactive.com

Recently, it was getting absolutely hounded with tons of meaningless requests. I’m assuming they are just results of AI.

So, I put Anubis in front of it. Now images hosted there won’t load on other sites, people have to wait forever to see the code, and the experience on phones is even worse. Just because AI doesn’t respect anything, and the people who run it are too stupid to realize that.

This is why we can’t have nice things.

Replying to @⁨mo_lave@reddthat.com⁩

I found that using a wildcard domain cert for HTTPS and an uncommon higher port number works just fine to avoid crawlers and scrapers. I also hide my ssh port behind WireGuard because I got annoyed with the bots filling up my logs with failed attempts. I’ve been doing that for nearly a year now and I have had no more issues with bots

I’m going off the assumption that the people who run crawlers and scrapers are going for known common ports for quick ease of access

I don’t feel the need to run anything extra such as Anubis either. The inconvenience of using an uncommon higher port number has been minimal and I still get to enjoy my tiny corner of the internet

Replying to @⁨teolan@lemmy.world⁩

I don’t understand how it’s suspicious if I am sharing my address with a custom port to people I know. I even take time to explain why I do it and in a way a nontechnical person would understand

The connection is still encrypted because I have a proper domain cert. There’s no warning or any other issue. I have spent more time securing my hardware/operating system/software than anything else, often taking priority over hosting more services

Do I really need to take all these extra steps like a VPS or a login for a basic blog generated from markdown files and a basic file server that has copies of my git repositories? Seems excessive when I already found a solution for myself that takes less effort and works to my satisfaction

I think there’s value in experimenting outside the current set standards and norms. Especially since corporations and states are obviously abusing the trust of these standards and norms for their own personal benefit

I personally feel like a small web/indie web can find their own their place again on the internet with a little creativity and a will to break away from the current norms. Trying to do more of the same will eventually lead to issues like burnout or ever growing frustration

I’m doing this for fun and for myself above all else. Experimenting with different, low effort approaches to the crawler/scraper issue is fun for me. Involving more outside services or adding more internal software does not sound like fun to me. It doesn’t sound like much fun for other people in this thread or by the original blog post either

Replying to @⁨mo_lave@reddthat.com⁩

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters Git Popular version control system, primarily for code VPN Virtual Private Network VPS Virtual Private Server (opposed to shared hosting) nginx Popular HTTP server

4 acronyms in this thread; the most compressed thread commented on today has 9 acronyms.

[Thread #165 for this comm, first seen 10th Nov 2026, 15:50] [FAQ] [Full list] [Contact] [Source code]

Hachyderm.ioImran Nazar ~ عمران نزر (@Two9A@hachyderm.io)3.24K Posts, 316 Following, 296 Followers · Front-end #typescript developer and general keyboard tapper; author of Internet RFC 7168 (Hypertext Coffeepot Control Protocol for teapots); occasional plumber, more than occasional #c64 #retrocomputing enthusiast, terrible at classical #piano. Header photo is a verdant scene looking over the landscape near Buxton, England, taken from a single-track country road.

Replying to @⁨mo_lave@reddthat.com⁩

i run a small browser game on a hetzner vps and for me the bots were never a load problem, it was the stats. the game shows how many people are online and every crawler that opened the live stream counted as a new player, in early october it was 28 of 61 stream opens. then a headless chromium on residential proxies, different ip every time, made 40 fake players in two days. what caught it was the Sec-CH-UA header, it said chromium 146 while the user agent said chrome 120, real browsers don’t mismatch like that. i don’t block them now, they just stop counting as people, which is kind of depressing too i guess