Api_block-archive is a project mainly written in C, it's free.
Memcached IP Blocking for nginx.
./configure --add-module=<this directory>
For some reason this wouldn't compile in Mac OS X (the libmemcached library uses the bool type which is inexplicably undefined in OS X).