News for hackers. Stuff that matters.
Re:There's No Protection In High Ports by barrkel on Sunday February 17, 2013 @03:00PM (#5236473)
Fail2ban is massively heavyweight on a cheap virtual server however, easily consuming half your memory if you aren't careful, and still obscene amounts of RAM for the functionality, with tight ulimits.
Re:There's No Protection In High Ports by ars on Sunday February 17, 2013 @03:25PM (#5236588)
Turn on a swap file and force it out.

On one server it's (supposedly) using 192m - but only 5m is resident, the rest is swapped out or unused.

On other 52m virt, but only 4m resident.

Re:There's No Protection In High Ports by barrkel on Sunday February 17, 2013 @04:04PM (#5236724)
Maybe I'm old-fashioned, but I find even 4MB complete overkill for the required functionality.

All the damn thing needs to do is keep a couple of running counters on a short buffer of IPs and run iptables when limits are met, and a periodic parse of a log file. This feels like something where 64k ought to be enough for anyone, much less 640k!

Sure, we can get by with a fifth of a gigabyte of swap space for this task. Ugh. I've spent too much of my life in debugger CPU views. Jack's quivering tower of abstractions writhes in repulsion.

Re:There's No Protection In High Ports by ars on Sunday February 17, 2013 @06:42PM (#5237291)
It's written in python, which takes about about 2m-5m just to get out of bed with nothing loaded or running. (I don't consider that a lot BTW, not a ding on python.)

There's about 200K of source code, but basically all the overhead is the python runtime.

(The memory usage of python doing nothing varied on different machines, but was always virtually identical to the usage of fail2ban.)

Also, the virt usage is mostly large memory mapped logfiles, not actual swap usage.