mod_unique_id
The mod_unique_id module attempts to generate a unique ID for every FTP session. To make the ID unique across multiple servers, the following bits of information are used:
UNIQUE_ID
--with-modules
This module is contained in the mod_unique_id file for ProFTPD 1.3.x, and is not compiled by default. Installation instructions are discussed here.
The most current version of mod_unique_id is distributed with the proftpd source code.
proftpd
Please contact TJ Saunders <tj at castaglia.org> with any questions, concerns, or suggestions regarding this module.
The UniqueIDEngine directive enables or disables the module's generation of a unique ID for each FTP session.
UniqueIDEngine
By default, UniqueIDEngine is on.
$ ./configure --with-modules=mod_unique_id
$ ./configure --with-shared=mod_unique_id
$ make $ make install
Alternatively, if your proftpd was compiled with DSO support, you can use the prxs tool to build mod_unique_id as a shared module:
prxs
$ prxs -c -i -d mod_unique_id.c
Since mod_unique_id generates a new unique ID for each session by default, there is no special configuration needed for enabling the module. Taking advantage of mod_unique_id, however, requires some adjustments in other parts of your proftpd.conf.
proftpd.conf
Example configuration:
<IfModule mod_unique_id.c> # Include the unique session ID in an ExtendedLog LogFormat session "%{UNIQUE_ID}e %h %l %u %t \"%r\" %s %b" ExtendedLog /path/to/extended.log ALL session # Store the unique ID in a SQL table named 'ftpsessions' SQLLog PASS login SQLNamedQuery login INSERT "'%{note:UNIQUE_ID}', '%u', now()" ftpsessions </IfModule>