Richard7
Member
Pentium III Enjoyer
- Joined:
- May 2024
- Posts:
- 129
- From:
- Norfolk, UK
Auth.log was 200MB in a week
Logrotate, my friend. Not everything needs a daemon.
/etc/logrotate.d/auth
with
size 10M
and
rotate 3
. Been doing this since before fail2ban existed.
Port knocking in 2009 needed kernel patches or userspace pcap. Now it's in repos everywhere but the fundamental tradeoff hasn't changed: security through obscurity plus inconvenience.
SPARCstation 20, still serving HTTP
svendeal
Member
Deal Sniper
- Joined:
- Jul 2024
- Posts:
- 301
- From:
- Miami, US
Auth.log was 200MB in a week
This is why I just disable password auth and move on. Key only, no root login, done. My 256MB boxes at CloudCone and wherever else, never run fail2ban or anything. The bot traffic still hits but they can't get in, logs or no logs.
Port knocking I tried, got locked out twice because mobile IP changed mid-knock. Never again.
world record: 4min Arch install
tinaworm
Member
- Joined:
- Jun 2024
- Posts:
- 84
- From:
- Riga, Latvia
I run a 96MB box in Riga, OpenVZ from some dead provider I got for $4/year. No iptables recent module available, kernel too old. I use denyhosts, remember that? Python 2, barely maintained, but it works. Parses auth.log, writes to hosts.deny.
Tcp_wrappers still functions on this ancient template. Richard7 would approve.
worst bandwidth, best stories
ana_mad
Member
- Joined:
- Jun 2024
- Posts:
- 298
- From:
- Madrid, ES
Key only, no root login, done.
This is the baseline. Everything else is optional. I manage 40 client servers in Madrid, mix of KnownHost dedicated and random VPS. My standard deploy: key auth, nonstandard port, firewall drop all else. fail2ban only on the 2GB+ boxes where clients demand it for compliance theater.
The 128MB cases I tell them to use CloudFlare tunnel or not host there.
swimming upstream since 2019 🐟
carlos2
Member
- Joined:
- Jun 2024
- Posts:
- 158
- From:
- Medellín, CO
Nonstandard port cuts bot traffic by 99% without any software. I track this myself, logs to my own InfluxDB. Port 22 gets thousands of attempts daily. Port 4422 gets maybe ten, all targeted not spray-and-pray.
Memory cost: zero. Security gain: marginal but noise reduction massive. I bill hourly in pesos, every MB of RAM saved is money.
not your keys, not your coins
tallinnying
Member
OP
Night Shift
- Joined:
- Aug 2024
- Posts:
- 268
- From:
- Tallinn, EE
It generates similar iptables rules but easier syntax.
ufw is python3 on Debian. On my box it takes 15 seconds just to
ufw status
. The rules it generates are fine but the tool itself is heavy for this use case.
I just learned
iptables-save
and
iptables-restore
, put my rules in
/etc/iptables/rules.v4
, load at boot with a tiny systemd service I wrote. No python, no persistent process.
builds at 3AM, sleeps at noon