prologic

twtxt.net

"Problems are Solved by Method" 🇦🇺👨‍💻👨‍🦯🏹♔ 🏓⚯ 👨‍👩‍👧‍👧🛥 -- James Mills (operator of twtxt.net / creator of Yarn.social 🧶)

Recent twts from prologic

Hey this could be good news for self-hosters and folks that want to run their own yarnd? 🤔 Vultr is offering 1 vCPU, 500MB Memory and 10GB Storage for FREE! That’s right $0.00 🤣

Image

⤋ Read More
In-reply-to » I'm usually comfortable keeping my hardship to myself, most especially AWAY from the internet; an act of kindness of sorts towards others, "Everyone's got their own problems to worry about" kind of thing.. But maaan am I starting to believe creating a twitter account would be a healthy decision 🤣🤦 Read nothin' out there, just a one way echo chamber of sorts to let that shi_ out of my chest. It seem that's what everyone else's been using it for all this time.

@aelaraji@aelaraji.com Man I’m sorry to hear this. 😢 Whatever it is you’re going through, things will get better I promise you 🤗

⤋ Read More
In-reply-to » Cool! 😎 So I can now block ASN(s) 🤣 (And I bet no-one noticed anything)

Note for reference I was trying to write and fix this rule (fixed version below):

# Ignore Content-Type restrictions for Git
SecRule REQUEST_HEADERS:Host "@streq git.mills.io" "id:101,phase:1,t:none,nolog,ctl:ruleRemoveById=920420"

⤋ Read More
In-reply-to » Cool! 😎 So I can now block ASN(s) 🤣 (And I bet no-one noticed anything)

I’ll try to add a README for caddy-waf soon™ (going back to bed now) at least document the customizations I’ve made to this WAF (which I forked from caddy-coraza)

⤋ Read More
In-reply-to » Cool! 😎 So I can now block ASN(s) 🤣 (And I bet no-one noticed anything)

This is how I build my caddy:

proxy-1:~# cat build.caddy.sh
#!/bin/sh

xcaddy build \
	--with github.com/caddy-dns/cloudflare \
	--with github.com/caddyserver/cache-handler \
	--with git.mills.io/prologic/caddy-ratelimit \
	--with git.mills.io/prologic/caddy-waf
proxy-1:~#

⤋ Read More
In-reply-to » Cool! 😎 So I can now block ASN(s) 🤣 (And I bet no-one noticed anything)

Ahh fuck! Sorry I was fixing a rule 🤣 This is much better!

proxy-1:~# grep -c 'Bad ASN' /var/log/caddy/caddy.log
2441

⤋ Read More
In-reply-to » Cool! 😎 So I can now block ASN(s) 🤣 (And I bet no-one noticed anything)

@bender@twtxt.net Yes they are rather large 🤣 Here you go:

proxy-1:~# cat /etc/caddy/waf/bad_asns.txt
# CHINANET-BACKBONE No.31,Jin-rong Street, CN
# Why: DDoS
4134

# CHINA169-BACKBONE CHINA UNICOM China169 Backbone, CN
# Why: DDoS
4837

# CHINAMOBILE-CN China Mobile Communications Group Co., Ltd., CN
# Why: DDoS
9808

# FACEBOOK, US
# Why: Bad Bots
32934
proxy-1:~#

⤋ Read More
In-reply-to » Cool! 😎 So I can now block ASN(s) 🤣 (And I bet no-one noticed anything)

@bender@twtxt.net AS Number:

An autonomous system (AS) is a collection of connected Internet Protocol (IP) routing prefixes under the control of one or more network operators on behalf of a single administrative entity or domain, that presents a common and clearly defined routing policy to the Internet.[1] Each AS is assigned an autonomous system number (ASN), for use in Border Gateway Protocol (BGP) routing. Autonomous System Numbers are assigned to Local Internet Registries (LIRs) and end-user organizations by their respective Regional Internet Registries (RIRs), which in turn receive blocks of ASNs for reassignment from the Internet Assigned Numbers Authority (IANA). The IANA also maintains a registry of ASNs which are reserved for private use (and should therefore not be announced to the global Internet).

⤋ Read More
In-reply-to » GUYS HELP I LOCKED MYSELF OUT OF MY ACCOUNT ON WEB AND I COULDN'T GET EMAILS WORKING I'M STUCK POSTING FROM CLI LOLLLL

@kat Temporally change the admin account on your pod to another account. Then login with that and reset the password on your main account.

⤋ Read More
In-reply-to » i love posting to my own personal youtube site i can just do whatever tf i want. no content ID here just vibes and finger crossing that i don't get a cease and desist one day

Also yarnd supports video too 🤣

⤋ Read More
In-reply-to » i love posting to my own personal youtube site i can just do whatever tf i want. no content ID here just vibes and finger crossing that i don't get a cease and desist one day

@kat Thanks! I built my own video hosting platform too but not nearly as fancy as what you use 🤣

⤋ Read More
In-reply-to » Hmmm so I've sustained two DDoS attacks on my Gitea server today. A few hours apar. Still analyzing the traffic...

@bender@twtxt.net you’re right the scale wasn’t that large, but analyzing the logs. It definitely was a detox attack. 🤣 I woke up this morning to see six other small spikes like this which I’ll have to analyze later tonight…

⤋ Read More
In-reply-to » i love posting to my own personal youtube site i can just do whatever tf i want. no content ID here just vibes and finger crossing that i don't get a cease and desist one day

@kat What do you use for this btw? 🤔

⤋ Read More

So I need to figure out how to block ASN(s)…

Additionally, I’ thinking of; How to detect DDoS attachs?

Here’s one way I’ve come up that’s quite simple:

Detecting DDoS attacks by tracking requests across multiple IPs in a sliding window. If total requests exceed a threshold in a given time, flag as potential DDoS.

⤋ Read More

For the time being… I’ve just blocked all of OpenAI(s) Bots. They (thankfully) publish a JSON endpoint that you can use to block all OpenAI crawlers from reaching your server (in my case, blocking it at the edge). Example:

proxy-1:~# curl -qs https://openai.com/gptbot.json | jq -r '.prefixes[].ipv4Prefix' | xargs -I{} ./block-ip.sh {}

Where block-ip.sh is simply:

#!/bin/sh

ufw insert 1 deny from "$1" to any

⤋ Read More
In-reply-to » Any idea What's this "twtxtfeevalidator/0.0.1" UA about? I thought I could ask before throwing a 1000GB file at it 🪤 could it be the same 'xt' thing @lyse was talking about the other day?

@aelaraji@aelaraji.com Yes! 👏 This is exactly what it is! 🤣 I will of course soon™ be hosting this service, likely at validator.twtxt.net 😅😅

⤋ Read More
In-reply-to » How in da fuq do you actually make these fucking useless AI bots go way?

@kat Haha 🤣 If someone figures this out, please let me know 🙏🙏 – In the meantime, I’m going to very soon™ write a daemon that will watch the audit log for repeated violations and add to the network firewall.

⤋ Read More
In-reply-to » Nice! I wrote another useful tool 👌

This is better:

proxy-1:~# ./audit-log-by-ip.sh 4.227.36.76 | coraza-log-formatter -m -
2025/01/04 23:17:04 4.227.36.76 58982 GET /external?aff-HY0BLO=&f=mediaonly&f=noreplies&nick=g1n&uri=https%3A%2F%2Fthe-president-codes.linegames.org null 0  On OWASP_CRS/4.7.0
Actionset: OWASP_CRS/4.7.0
Message: Bad User Agent
Severity: 0
Raw: SecRule REQUEST_HEADERS:User-Agent "@pmFromFile /etc/caddy/waf/bad_user_agents.txt" "id:2000,log,phase:1,deny,msg:'Bad User Agent'"

⤋ Read More

Nice! I wrote another useful tool 👌

proxy-1:~# ./audit-log-by-ip.sh 4.227.36.76 | coraza-log-formatter -m -
Actionset: OWASP_CRS/4.7.0
Message: Bad User Agent
Severity: 0
Raw: SecRule REQUEST_HEADERS:User-Agent "@pmFromFile /etc/caddy/waf/bad_user_agents.txt" "id:2000,log,phase:1,deny,msg:'Bad User Agent'"

⤋ Read More

How in da fuq do you actually make these fucking useless AI bots go way?

proxy-1:~# jq '. | select(.request.remote_ip=="4.227.36.76")' /var/log/caddy/access/mills.io.log | jq -s '. | last' | caddy-log-formatter -
4.227.36.76 - [2025-01-05 04:05:43.971 +0000] "GET /external?aff-QNAXWV=&f=mediaonly&f=noreplies&nick=g1n&uri=https%3A%2F%2Fmy-hero-ultra-impact-codes.linegames.org HTTP/2.0" 0 0
proxy-1:~# date
Sun Jan  5 04:05:49 UTC 2025

😱

⤋ Read More