[Proftpd-user] Data channel port logging?

Jeff Gibson <[email protected]>
Newsgroups gmane.network.proftpd.user
Message-ID <DM5PR04MB1180655110D243522705A9D1AC200@DM5PR04MB1180.namprd04.prod.outlook.com>
Hi everyone.  I'm trying to figure out if the data channel logging I'd like to use is possible.


I'm using the ExtendedLog format so I can match IPs/ports to our load balancer logs for troubleshooting connections.

I've noticed that only the control channel ports are logged.  I don't see any option to also log the incoming (or outgoing) data channel port for ExtendedLog.

Tracelog will show the incoming port for passive mode but not for port mode - plus I can't customize the format.

Is any of this possible at all or on any sort of roadmap?  Are they shown in a different log?

The closest matches I can get in ExtendedLog is cmdargs="10,128,2,224,34,93" for port mode or response="Entering Passive Mode (10,128,43,119,56,185)" which of course are not easy to parse.  Ideally I'd like to see the client and server ports used for every data channel request regardless of mode.

What I find curious is that in the mod_log/ExtendedLog documentation there is a See Also link to points to TransferLog.  Likewise there is a link from the mod_core/TransferLog section back to ExtendedLog which seems to imply that TransferLog can be formatted like ExtendedLog.  However I haven't had any success getting this to work.

Here are the relevant parts of my config.  Some of them are probably not used but I'm including them for completeness.

Platform: CentOS 8
ProFTPd version: 1.3.6b

TraceLog /var/log/proftpd/trace.log
Trace DEFAULT:10 tls:10 sftp:10 directory:10 fileperms:10

SyslogFacility ALL
SyslogLevel debug
SystemLog /var/log/proftpd/systemlog.log # just produces an empty file


Logformat session "%{%F %T}t.%{millisecs}Z uuid=%{env:UUID}, serverip=%L, serverport=%p, clientip=%a, clientport=%{remote-port}, pid=%P, protocol=%{protocol}, user=%u, responsecode=%s, cmd=%m, cmdargs='%J', response='%S', rawbytesin=%I, rawbytesout=%O, responsetime=%R, filename='%F', status=%{transfer-status}, type=%{transfer-type}, filesize=%{file-size}, xfer_time=%T, modified=%{file-modified}, fail_msg='%{transfer-failure}', exit_reason='%E'"

<Global>
     ExtendedLog                         /var/log/proftpd/session.log ALL,EXIT session
</Global>

<VirtualHost 0.0.0.0>
    TransferLog                         /var/log/proftpd/ftp-xfer.log  # wu-ftpd style logging only
    OR
    TransferLog NONE # experimenting that turning this off may switch it to use the ExtendedLog format.  It doesn't
    DebugLevel                          10
    Port                                21
    ServerLog                           /var/log/proftpd/ftp-server.log # Logs nothing
</VirtualHost>



Thank you.
JG

_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.