Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why I rate-limit every self-hosted service (and you should too)

I learned this the hard way: an exposed Jellyfin or Vaultwarden instance without rate-limiting is a free buffet for credential stuffing bots. This is the setup I now apply to every public-facing self-hosted service. What rate-limiting actually prevents Brute-force login attacks : bots trying common passwords on /login endpoints API abuse : scrapers hitting your Immich or Paperless APIs at 100…

The author emphasizes the importance of rate-limiting every self-hosted service to prevent various types of attacks. He learned this lesson the hard way, as an exposed instance of Jellyfin without rate-limiting became vulnerable to credential stuffing bots. To mitigate these threats, he uses fail2ban on all public-facing services, monitoring log files for failed login patterns and banning offending IP addresses at the firewall level.

The author outlines a generic fail2ban configuration for most services and provides specific jails for applications like Jellyfin, Vaultwarden, and Plex. For services that already have built-in brute-force protection, he layers fail2ban on top for additional security. He also uses Nginx to rate-limit login attempts at the reverse-proxy level, further limiting the number of requests from a single IP.

For services hosted behind Cloudflare, he takes advantage of the free tier's DDoS protection, bot management, and rate limiting rules to add another layer of defense. He logs ban events to a centralized Loki/Grafana setup and escalates the bantime or blocks entire IP ranges if needed.

The author acknowledges that rate-limiting does not protect against zero-day exploits, compromised credentials, or attacks via VPNs. To address these concerns, he recommends patching services quickly, using two-factor authentication (2FA) on all accounts, and considering VPN-only exposure's inherent risks.

Overall, the author argues that the cost of implementing these measures is minimal (around $0 and ~3 hours of one-time setup), while the benefits are significant. He concludes that following these five steps will make self-hosted services far safer than 95% of other homelabs.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Exposing the Placement Scam: How Higher Education Manipulates Job Statistics

The Myth of "100% Placements" Every year, millions of students and parents enroll in higher education institutions driven by a single promise blazoned across billboards and brochures: "100%…

  • Colleges inflate placement percentages using outlier salary averages.
  • LOIs and conditional offers counted as confirmed placements.
  • Placement fees force graduates into low-paying roles.

My 3-2-2 self-hosted backup strategy (with the WebDAV mount trick)

I've been refining my home backup setup for about 3 years. After one false-start year where I overcomplicated everything, this is the strategy that actually stuck.

  • Author's backup strategy follows 3-2-2 approach with redundancy in cloud storage
  • NAS share recognized on Windows via ScsDriver mount trick
  • Encryption with restic and backup software cost under $20

Why Your Website Is Slow: 7 Performance Problems Developers Should Fix

A website can look beautiful, contain useful content, and offer excellent features, yet still frustrate users if it takes too long to load. Website performance is not just a technical concern.

  • Unoptimized images increase webpage file size
  • Excessive JavaScript slows down website performance
  • Browser caching improves user experience

More from Monday 19 October →