3 ms·
It does seem to be very similar in spirit and implementation: > PerSourceNetBlockSize > Specifies the number of bits of source address that are grouped togethe
by lxgr 2y ago
It does seem to be very similar in spirit and implementation:
> PerSourceNetBlockSize
> Specifies the number of bits of source address that are grouped together for the purposes of applying PerSourceMaxStartups limits. Values for IPv4 and optionally IPv6 may be specified, separated by a colon. The default is 32:128, which means each address is considered individually.
Just like fail2ban, this seems like it can be equal parts helpful, a false sense of security, and a giant footgun.
For example, allowing n invalid login attempts per time interval and (v4) /24 is not a big problem for botnet-based brute force attacks, while it's very easy for somebody to get unintentionally locked out when connecting from behind a CG-NAT.
- SoftTalker 2y agoufw/iptables and other firewalls can also throttle repeated connection attempts, which is almost always fine but could be something you don't want if you have a legitmate need to support many rapid ssh connections from the same source (CM tools, maybe?)
- yjftsjthsd-h 2y ago> if you have a legitmate need to support many rapid ssh connections from the same source (CM tools, maybe?) If you're doing that, I strongly suggest using ControlMaster to reuse the connections; it makes security tools like this less grumpy, but it's also a nice performance win.
- aflukasz 2y agoJust remember that only first connection, the one creating ControlMaster socket, is being authenticated, subsequent ones are not.
- megous 2y agoIt's easy to do per source IP address and reasonably easy to add source IP address to whitelist automatically after successful auth.