NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
How to Block Some of the Bots (nochan.net)
CqtGLRGcukpy 32 minutes ago [-]
If you are unable to read this, there is an archived copy at https://archive.ph/d3236
Barbing 17 minutes ago [-]
Thanks. Regretful implementation*, being a normie on iOS Safari:

https://i.ibb.co/vCDH79d0/IMG-0303.png

…and not a bot… hoping not to turn off iCloud Private Relay to read, well, anything. (Maybe Google Scholar if I really needed it, the most mainstream thing I know of with a complete and effective iCloud relay ban.)

*edit: per author’s reply elsewhere, as a test site, rather a good implementation! But other webadmins, please don’t adopt all methods if you can avoid it :)

Bender 12 minutes ago [-]
That makes sense. I block most data-centers and that would include much of Apple's data-centers. What I am doing is of course unorthodox for a blog. This is more of a test site to show what could be done. People can pick and choose which features they like for their particular use cases.

I could some day split it out into a blog and a demo site.

hdjrudni 25 minutes ago [-]
I wonder why you'd be unable to read it? :-)
cwillu 9 minutes ago [-]
Because of shitty over-zealous blocking, probably.
fxtentacle 2 hours ago [-]
I like the idea of adding a fake cpanel subdomain for 169.254.169.254 so that script kiddies will start port-scanning their own hosting provider, which will likely get them flagged/banned.
Bender 2 hours ago [-]
When I first experimented with that I was not expecting anything to happen. Within a few days one person in Amazon EC2 in Germany started trying to do zone transfers for some of my domains likely to figure out which records to avoid and then they just excluded my domains entirely. All of the scanning stopped shortly thereafter. The scanning noise was literally all coming from one person despite the source IP's being all over the internet.
binaryturtle 2 hours ago [-]
410 and a "Sec-Fetch-Mode:" string in the response body. I guess it thinks I'm a bot? Thanks!

Nothing to read, nothing to see, I move along. (Yikes, the modern web sucks!)

Bender 2 hours ago [-]
Real browsers send it. [1] Some of the reader apps do not. Most bots aside from those utilizing Chrome Headless do not.

People can see a few headers here [2]

[1] - https://caniuse.com/?search=sec-fetch-mode

[2] - https://nochan.net/.env

gruez 2 hours ago [-]
I didn't even make it that far, I got PR_END_OF_FILE_ERROR which indicates it couldn't even get past the tls handshake.
ErroneousBosh 1 hours ago [-]
I mean that just might be the dying gasp of a puddle of scorched fibreglass and boiling copper where the server used to be.
Bender 1 hours ago [-]
Mostly harmless(c)

    load average: 0.00, 0.01, 0.00
genodethrowaway 23 minutes ago [-]
and all valid traffic too, judging by these HN comments (and my own attempts to connect).
Bender 20 minutes ago [-]
The comments can be misleading. About 1950 people and a few bots have been able to view it. Sunday is the best day to see all the unusual browsers and applications people browse the web with. Weekdays tend to be more mainstream bog standard browsers. This is a good test.
fatty_patty89 10 minutes ago [-]
what's up with those response headers? "adult" ...

"ai" ...

response length 68

Bender 8 minutes ago [-]
AI will not ingest or operating on anything with obscene or foul terms or at least that is what I have been led to believe.
fatty_patty89 6 minutes ago [-]
weird misdirection excuse

edit:

>"I can not see votes or karma and do not require social validation. "

>proceeds to downvote

classic

Bender 31 seconds ago [-]
[delayed]
FabCH 20 minutes ago [-]
The post content is great. I personally hate the way Cloudfare has been the „default answer“ for the bot problem because Cloudfare has become the most successful MITM attack in history. We need content like this to keep the internet alive.

The added explanations by the author in this comment thread are hilarious. You sir are a good writer.

RobotToaster 38 minutes ago [-]
Blocks firefox's built in VPN.
Bender 33 minutes ago [-]
That's likely from me blocking data-centers as they probably do not have residential exit nodes. There are a couple nftable rules that could block most VPN's as well but they also block some cellular networks so I left that out.
ajsnigrutin 1 hours ago [-]
There's a special place in hell for people who block curl and wget, especially on sites with downloadable files (eg source code tgz's, media, etc.), basically anything i might need to wget on a server.
Bender 1 hours ago [-]
A guy gets sent to hell. The demons guide him into the lobby. Satan jumps out and lets out a big evil roar to no effect. Satan then glances down and sees the spot on the mans finger where there was a ring. "Oh... well you've been through worse. The break room is down the hallway to the left, mail room is upstairs to the right..." Satan just walks away.

Every step is optional of course. There are ways to make curl work on my site but I choose to add friction as some botters abuse libcurl. I doubt anyone else will do what I do. They could spoof the user-agent but most botters seem to not know how to do that despite the myth that they all do. For what it's worth if I had a site specific to sharing code artifacts or archives I would not block curl and I would also enable native rsyncd.

iririririr 2 hours ago [-]
most (all?) of those will 100% block valid traffic too
Bender 1 hours ago [-]
I would be interested in some examples of valid traffic that they would block. For the purposes of the document I do not consider anything from a data-center to be valid traffic. People can of course skip any or all steps, experiment with one at a time on a test server as they should.
ACCount37 38 minutes ago [-]
VPN exits often "come from datacenters". And there are entire countries where the web can be unusable without.

If you don't have LaLiga in your country, that doesn't mean everyone is so lucky. Blanket IP range bans, in this day and age? Basically a proclamation of incompetence.

Bender 31 minutes ago [-]
Basically a proclamation of incompetence.

I understand your frustration. Normally a blog site would not have any or many of these measures enabled. This is more of a test site to show what could be done on any other type of site. People can pick and choose which methods to use. Some may wish to block VPNs and proxies especially on forums.

ferngodfather 1 hours ago [-]
> Obvious proxy is obvious.

> if ($http_x_forwarded_for) {....

This may block schools and libraries that use content blockers. Often the internal client is left to make abuse tracking easier (or because the overworked admin didn't know they could turn it off).

Bender 1 hours ago [-]
This may block schools and libraries

Oh, well that is ok for me I suppose. I add RTA/adult headers that hopefully they also look for and block using parental controls as adult content should not be viewed in a school or library. I could add a note suggesting to skip that step if one wishes schools and libraries that may be using a proxy to view.

ferngodfather 53 minutes ago [-]
That's fair enough.

I think it's a great article to be fair. We need more of this cheap and quick bot blocking. The fact the solution to unwanted traffic is often "use Cloudflare" is _not_ great for the internet, and nobody really actually likes deploying or managing ModSecurity. Its a nice middleground.

Capricorn2481 1 hours ago [-]
Am I the only one that exclusively gets attacks with spoofed user agents and rotating TLS signatures? I feel like every post I see about not needing a CDN has tips that could be overcome in under an hour of scripting.
gorkemyildirim 13 minutes ago [-]
[dead]
receptopalak 44 minutes ago [-]
[flagged]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 21:00:04 GMT+0000 (Coordinated Universal Time) with Vercel.