lingo.lol is one of the many independent Mastodon servers you can use to participate in the fediverse.
A place for linguists, philologists, and other lovers of languages.

Server stats:

69
active users

#fail2ban

1 post1 participant1 post today

I'm curious to hear what others are #SelfHosting! Here's my current setup:

Hardware & OS

Infrastructure & Networking

Security & Monitoring

Authentication & Identity Management

  • Authelia (Docker): Just set this up for two-factor authentication and single sign-on. Seems to be working well so far!
  • LLDAP (Docker): Lightweight LDAP server for managing authentication. Also seems to be working pretty well!
    #AuthenticationTools #IdentityManagement

Productivity & Personal Tools

Notifications & Development Workflow

  • Notifications via: #Ntfy (Docker) and Zoho's ZeptoMail (#Zoho)
  • Development Environment: Mostly using VSCode connected to my server via Remote-SSH extension. #VSCodeRemote

Accessibility Focus ♿🖥️

Accessibility heavily influences my choices—I use a screen reader full-time (#ScreenReader), so I prioritize services usable without sight (#InclusiveDesign#DigitalAccessibility). Always open to discussing accessibility experiences or recommendations!

I've also experimented with:

  • Ollama (#Ollama): Not enough RAM on my Pi.
  • Habit trackers like Beaver Habit Tracker (#HabitTracking): Accessibility issues made it unusable for me.

I don't really have a media collection, so no Plex or Jellyfin here (#MediaServer)—but I'm always open to suggestions! I've gotten a bit addicted to exploring new self-hosted services! 😄

What's your setup like? Any cool services you'd recommend I try?

#SelfHosted #LinuxSelfHost #OpenSource #TechCommunity #FOSS #TechDIY

@selfhost @selfhosted @selfhosting

🏕️ my adventures in #selfhosting - day 89 ✨

Oh #PeerTube, you are making me do mental somersaults as I strategize about the best way to self-host my videos.

This newbie wants to ask: how many VPS’s are too many for someone who has little coding experience and has been self-hosting for just 3 months?

Fedi friends, I’m thinking of signing up for a THIRD VPS 😱

Why?

My current setup:

1️⃣ 5€/month Debian VPS with #YunoHost, where I’m self-hosting #GoToSocial (this account), #Friendica, #Pixelfed, #Fail2Ban and #LinkStack.
2️⃣ 5€/month Ubuntu VPS where I am self-hosting my (upcoming) #Ghost blog (this will make me save a ton, compared to my current Ghost Pro plan).

Back to PeerTube: I could easily upgrade my #Debian VPS and install it there - the costs would be minimal and I would double my RAM and storage. But I am afraid of PeerTube’s consumption when it comes to bandwidth. As in: if I upload a video that for some reason becomes really popular, or if a bad actor decides to DDOS my channel, would that take down all my other self-hosted Fediverse instances? Since they are on the same VPS?

I could limit potential issues by having a dedicated VPS just for PeerTube.

What would you do?

And do you have recommendations for Europe-based VPS’s with affordable plans? (aside from Hostinger) I was thinking of #Hetzner…

#MySoCalledSudoLife #AskFedi

🏕️ my adventures in #selfhosting - day 77 ✨

This morning I'm attempting a manual install of #Fail2Ban (that is, with commands, no YunoHost) on my #Ubuntu VPS.

I've been greatly enjoying Fail2Ban on my #Debian VPS and I'd like to extend the same protections to the VPS with my self-hosted #Ghost blog.

I hope nothing goes wrong because I have a video call with Stanford students at the study abroad program in Florence at 11am (for a women in cinema class, I'm invited every year)... so I don't wanna feel distracted by tech issues, ha!

#MySoCalledSudoLife

Les personnes qui ont leur propres instances #mastodon : vous pourriez me partager votre config #fail2ban pour sécuriser les brute-force?
Je suis en trn de mettre en place mon instance mais vu le nombre de tentatives de connexions sur les autres services je flippe un peu...
PS: mes recherches sur le web ne m'ont pas donné de résultats satisfaisants (la règle mais pas la conf du jail, etc...)
Merci d'avance!!!
#autohebergement #cyberattaque #serveur

Protegido mi servidor con #ufw #fail2ban contra ataques al puerto ssh ... comprobado y funciona.
Estoy usando las vpn de proton que me facilitan el ir cambiando de ip para probar.

He instalado en el VPS el proxy inverso #pangolin docs.fossorial.io/overview que aunque está en un estado muy inicial funciona bien y los desarrolladores hace un muy buen trabajo el producto final va a ser muy muy bueno 😄

Seguiré probando y cacharreando hasta que este bien seguro de los riesgos y ventajas. Como siempre no tengo prisa y aprender es lo que me gusta.
#derechoareparar #linux #selfhosting

docs.fossorial.ioFossorial Docs

🏕️ my adventures in #selfhosting - day 48 ✨

Yesterday when I got back from #FOSDEM I found an email in my inbox that gave me a mini-heart attack: a message from my VPS hosting company saying my service had been suspended for running over costs / my card being declined.

The email looked absolutely legit, formatting and branding-wise. But I'm not a fool! I didn't click on any links, just closed it and logged onto my VPS account from another device. I checked billings and resource usage and everything was normal. Ouf. So it was a targeted phishing attack (someone who went through the trouble of looking up my hosting company and finding my contact email address, right when I was traveling and publicly posting from FOSDEM).

Nice try scammer! But you didn't fool me.

Thing is, realistically speaking I could have consumed too many resources. I'm at 75% RAM usage now. As soon as I stop paying for a Ghost(Pro) plan next month, I will upgrade my VPS. And please prevent me from adding another Fediverse app, I'm SOOO tempted to self-host #Friendica too, after re-falling in love with it during a demo at #SocialWebFosdem.

Anyway, today I hit a milestone of sorts: my first experience updating #YunoHost AND 3 different apps (#Fail2Ban #Pixelfed and #GhostIO). Everything went smoothly and my system diagnostics dashboard is all green – just as I like it.

This self-hosting journey is really empowering and the best antidote to my frustration/rage towards Big Tech oligarchs. You can't control my Fedi homes!

IPs banned by Fail2Ban:
IP 165.154.10.250
IP 167.94.146.57
IP 178.215.236.208
IP 207.90.244.4
IP 167.172.176.79
IP 167.172.183.13
IP 185.142.236.36
IP 167.94.145.104
IP 15.204.171.201
IP 207.90.244.14
IP 104.248.248.231
IP 64.226.71.50
IP 207.90.244.15
IP 5.101.0.66
IP 185.165.191.26
IP 207.90.244.11
IP 199.45.155.95
IP 211.252.168.97
IP 15.204.171.201
IP 152.32.134.156
IP 165.154.128.199

Yet another night debugging email delivery problems

I’ve run my own mail server for 30+ years. It’s a pain sometimes, but I’m a stubborn old cuss and I think it’s worth it both because I value my privacy and don’t want my emails being stored on somebody else’s servers, and because I’m a sysadmin at heart and I love a good sysadmin challenge, which running a mail server definitely is.

Every once in a while the corporate email service providers come up with a new way to screw things up for small mail server operators like me. Most recently, both Proofpoint and Cisco IronPort SMTP servers started having trouble delivering emails to my server. Maybe you’ll find the explanation of why amusing, or at least maybe you’ll find the bits below about how to get sendmail to accept more TLS ciphers useful.

The behavior I was seeing was that whenever someone using Proofpoint or IronPort for their outbound email delivery attempted to send me email, it would be delayed for many hours before finally being delivered. I started digging into my sendmail logs and saw messages like this every hour:

Nov 17 00:33:33 jik4 sendmail[372431]: STARTTLS=server, error: accept failed=-1, reason=no shared cipher, SSL_error=1, errno=0, retry=-1, relay=esa12.hc6077-55.iphmx.com [139.138.46.199]
Nov 17 00:33:33 jik4 sendmail[372431]: 4AH5XXPf372431: esa12.hc6077-55.iphmx.com [139.138.46.199] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

My mail server runs on CentOS Stream 9, which is pretty strict about which TLS ciphers its servers accept by default. Therefore, my first theory about what was causing the delivery issues was that Proofpoint’s and IronPort’s servers are running old SSL libraries that don’t support modern, secure ciphers.

However, this raises an obvious question: if that’s true, then why were these messages eventually being delivered at all. Shouldn’t the servers just keep trying and failing to connect with their old TLS ciphers and then eventually give up? I.e., shouldn’t delivery just fail completely, rather than being delayed?

I hand-waved away this question by observing that either of the following might be true:

  • Some of their servers run more modern code, so eventually one of those servers attempts to deliver the message and it works.
  • They have a fallback built into their delivery pipeline, such that if a certain number of delivery attempts with TLS fail, they fall back on delivering without TLS.

Neither of these is true, and I shouldn’t have hand-waved away this question, but I’ll get to that later since I’m telling the debugging story in chronological order.

Since at this point my theory was that the problem was that Proofpoint and IronPort servers didn’t support modern SSL ciphers, I decided to try figuring out how to get my sendmail to accept a larger list of SSL ciphers. I have attempted to do this in the past and failed, but this time I decided to be more persistent.

The first problem I had to solve was how to identify which TLS ciphers were supported by the running sendmail process, so I could easily test whether my attempts to make it accept more were working. I dig around a bit online and found the tool “sslscan” which works great for this purpose: “sslscan –starttls-smtp hostname:25″. Sslscan is conveniently available for installation from Debian’s repositories.

First attempt at expanding the list of accepted ciphers: I captured the list of supported ciphers with sslscan, ran “update-crypto-policies --set LEGACY“, restarted sendmail, and tested again with sslscan. No change, unfortunately.

Next, I said to myself, “Hmm, is there some way to explicitly tell sendmail in its configuration file to accept more ciphers.” After consulting /usr/share/sendmail-cf/README and the openssl-ciphers man page, I concluded that adding “define(`confCIPHER_LIST', `ALL')dnl” to the M4 source file for my sendmail.cf, then rebuilding and reinstalling it and restarting sendmail, might yield a bigger list of supported ciphers. And indeed, sslscan confirmed that this added 5 additional supported ciphers to the original list of 12.

However, those ciphers looked mostly like the old ones, so I was pretty sure I had to go further. Next I tried using “@SECLIST=1:ALL” as the cipher list instead of just “ALL“. I suspected that this might make a difference because /etc/crypto-policies/back-ends/openssl.config starts with “@SECLIST=2:“. Alas, it didn’t help.

I tried again with “@SECLIST=0” instead of “@SECLIST=1“, and the added an additional 14 ciphers. Some of these looked quite different, so maybe this would be enough to get Proofpoint and/or IronPort to be able to deliver email? I went back to one of the websites where I knew how to trigger an email message sent to me through Proofpoint, and tried it out. No luck, still “no shared cipher” in the log.

At this point I needed another solution, so I asked myself whether I might have been wrong to hand-wave away the question of why the email messages were eventually being delivered successfully. Just allowing my brain that small amount of space to question my priors caused me to have a revelation. It suddenly occurred to me that there were other log messages related to Proofpoint and IronPort delivery fails that I had been dismissing as irrelevant which in fact where not irrelevant at all. They looked like this:

Nov 17 00:34:34 jik4 sendmail[372437]: 4AH5XXIZ372437: timeout waiting for input from esa12.hc6077-55.iphmx.com during server cmd read
Nov 17 00:34:34 jik4 sendmail[372437]: 4AH5XXIZ372437: lost input channel from esa12.hc6077-55.iphmx.com [139.138.46.199] to MTA after rcpt
Nov 17 14:33:44 jik4 sendmail[614551]: 4AHJH3eD614551: collect: premature EOM: Connection timed out with mx0a-001e6701.pphosted.com
Nov 17 19:15:28 jik4 sendmail[701129]: 4AI0ESSZ701129: timeout waiting for input from mx0a-001e6701.pphosted.com during server cmd read
Nov 18 06:58:18 jik4 sendmail[908302]: 4AIBvHH3908302: lost input channel from mx0a-001e6701.pphosted.com [148.163.149.215] to MTA after mail

When I first saw these messages, I just assumed they indicated that Proofpoint’s and IronPort’s servers were being stupid about something. That was a mistake. In fact, it was my server that was being stupid.

I use fail2ban configured on my server, and I have it configured to aggressively block suspicious SMTP connections. It blocks a server for an hour after a single suspicious log message from that server, and the “did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA” messages shown above, that are generated after Proofpoint or IronPort attempts and fails to initiate TLS and then disconnects, count as suspicious.

So while the fact that Proofpoint and IronPort don’t support modern TLS ciphers was the root cause of the issue, my server was exacerbating the problem by banning their IP address immediately after they tried to do TLS, so that they were then unable to reconnect and deliver the message without TLS.

The reason why the messages from these servers were eventually being delivered is that there’s sometimes a 1–2 second delay between when a suspicious log message appears and when fail2ban bans the associated server IP, and after trying over and over eventually the Proofpoint or IronPort managed to sneak in a successful message delivery during that short delay.

The solution, therefore, is to make fail2ban less aggressive about banning suspicious SMTP servers. However, if I do that, then my server is much more vulnerable to brute-force SMTP authentication attacks? What to do, what to do?

Maybe there’s another suspicious log message I can match against in the logs instead of the “did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA” messages which are caused innocuously when a TLS connection fails? With just a little bit of digging I found these:

Nov 21 23:07:50 jik4 sendmail[58510]: 4AM47hXh058510: AUTH failure (LOGIN): authentication failure (-13) SASL(-13): authentication failure: checkpass failed, user=postmaster, relay=[109.172.142.229]

Wait a minute, why the heck isn’t fail2ban banning based on this message which is obviously, unambiguously a brute-force login attempt?

Well, you see, it turns out that I originally configured fail2ban to ban based on the “did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA” messages way back in 2007 (like I said, I’ve been running my own mail server for a long time), and back in 2007, the “AUTH failure” log messages did note have the “relay=” at the end of them. That wasn’t added until release sendmail 8.14.4, which was released in December 2009 (I figured out which release this was added in by doing a binary search through all of the old sendmail source archives on ftp.sendmail.org).

Putting this all together:

  • One root cause of the incoming email delivery issues is Proofpoint and IronPort being stupid about which TLS ciphers they support.
  • A second root cause is my fail2ban configuration being too aggressive about banning suspicious SMTP servers, resulting in servers being banned for engaging in innocuous activities.
  • Configuring sendmail to accept more TLS ciphers is the wrong solution.
  • The right solution, which I’ve implemented, is to make fail2ban more selective about which log messages it considers suspicious, so it won’t ban the Proofpoint and IronPort servers for failing to initiate a TLS connection.

See, now, this is actually one of the reasons I love running my own mail server: there is immense satisfaction in getting to the bottom of one of these problems and successfully solving it.

www.addtoany.comShare to Mastodon - AddToAny

It’s not much, but it’s mine. After struggling a bit with Docker in the testing environment, I managed to get everything running on an old laptop, and it worked great! Moving the app to production was a little more involved, but the containerization procedure I had set up mostly worked, and I learned a lot.

I went with a cloud-hosted virtual machine running Ubuntu Server with three Docker containers: 1) the Nginx reverse proxy, 2) the PostgreSQL database, and 3) the Django app itself. All three containers are running with Docker Compose, making it a **lot** easier to spin things up and change configs. I am a convert.

Getting the reverse proxy to work on HTTP was no problem, but the HTTPS certificate was a pain in the ass. I never could figure out how to get Certbot to fetch the SSL certificates through the proxy server, so I ended up just turning off the site for a second and fetching them manually through port 80. High on my to-do list is figuring out how to automate this process so I don’t have to remember to do it manually every three months.

Once I had the site running on HTTPS, the only other snag was that Django was throwing a CSRF error every time I tried to do something involving a POST request. Turns out, running a proxy server, I needed to add https://tinyblog.website/ to my trusted origins in my production settings:

CSRF_TRUSTED_ORIGINS = ['https://tinyblog.website']

And that’s it?? The site is up and running, with no real hiccups. I write posts, it saves them to the database, it serves them to the public web when asked. OK. Although my reverse proxy was getting a concerning number of sketchy requests from bots, so I installed Fail2Ban and configured it to use UFW to keep the burglars out.

For the moment, Tinyblog is very tiny: It’s a Django app with two methods and two views. Extremely basic. My idea is to add new features every so often, testing and updating as I go, keeping it live, learning some lessons, hopefully not breaking anything too catastrophically.

Next up on my to-do list: a “like” button for the posts. This may involve JavaScript. Oh, and I should probably add a static “About” page. Let’s go!

https://www.peterkrupa.lol/2024/09/23/tinyblog-is-live/

did I need #blacklistd or #fail2ban?

when using `port 22`, my logs file tell me there is bunch of foreign IP's trying to connect to my VPS using ssh protocol all the time (especially from Vietnam, Cina, Rusia)

when using random port above 10000, the logs is clean. Not single one IP trying to connect.

Continued thread

In my team, we had to step up our #fail2ban game this year having repeatedly experienced CPU overload on our servers due to massive bot scraping. This not only put quite some stress on the machines but also on people. I assume this happened at most places that are running their own data centers...

Continued thread

He seguido avanzando con el homelab

Configurado #podman con #pasta y una configuración que preserva la IP origen.

Esto me ha permitido que los logs del proxy mantengan la IP de quien hace las peticiones. Muy útil si quieres #fail2ban

He avanzado tb en el tema de la observabilidad, con #grafana y #prometheus en cada usuario

El siguiente paso meter secretos y los backups