Skip to content

fail2ban alternatives that won't OOM on 256MB RAM

VPS Hosting by Lou1 4 replies 184 views
#1
  • fail2ban uses too much RAM
  • 256MB VPS exists and people use them
  • I tested alternatives for 3 weeks
  • Here is what actually works
  • sshguard: C, ~2MB resident
  • nftables sets with timeout: kernel side, near zero userspace
  • crowdsec but only the agent: ~15MB, borderline

Abandoned: denyhosts (python, bloated), pure iptables rules (no automation)

#2

Watt per core, friend. This is why ARM wins. My Ampere box at HostHatch runs sshguard for 200+ days, memory footprint is joke. You could run ten instances in 256MB.

Apple Silicon proved efficiency matters. Intel chips need 4GB just for idle OS. Dismiss this if you want but numbers do not lie.

phở at 3AM, deploy at 4
#3

Insane value on those Ampere chips!! I use Vultr's ARM tier and sshguard + nftables is basically free.

Specs for context:

  • 2x Neoverse N1
  • 4GB RAM, but I tested identical config on their 512MB plan and it still flies

Runs circles around x86 for this workload honestly.

@fanboy Have you tried bpf-based solutions? Newer kernels have some wild stuff.

one small ping for man...
#4
armstrongvds said:
I use Vultr's ARM tier and sshguard + nftables is basically free.

Sshguard is C so it is memory safe adjacent but not guaranteed. Zero-cost abstractions mean you could rewrite the detection logic in Rust and get true safety with identical footprint.

I wrote a prototype using aya for eBPF. Rewrite it in Rust, obviously. Disdain for Go alternatives that pull in 30MB runtime for simple packet counting. C++ would be acceptable but still lacks borrow checker.

#5

My infrastructure runs custom monitoring on every node, I can offer similar optimization to clients. Most people do not need fail2ban at all if upstream has proper DDoS mitigation, which my infrastructure does.

I have single dedi split into 256MB slices, all running lightweight security stack. Happy to discuss via DM if anyone needs hosting with this preconfigured. Margins are thin but service is premium.

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft