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
environment variable
in a printable form; other modules can retrieve the unique session ID from the
environment. (Note that you will want mod_unique_id
listed toward
the end of your --with-modules
configure list, so that the
ID generation runs early in the session establishment process.) The contents
of the UNIQUE_ID
should be considered opaque, and are subject
to change in the future.
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.
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.
By default, UniqueIDEngine
is on.
mod_unique_id
module is distributed with ProFTPD. For
including mod_unique_id
as a statically linked module, use:
$ ./configure --with-modules=mod_unique_idAlternatively,
mod_unique_id
could be built as a DSO module:
$ ./configure --with-shared=mod_unique_idThen follow the usual steps:
$ 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 -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
.
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 "'%{env:UNIQUE_ID}', '%u', now()" ftpsessions </IfModule>