Search code examples
ftpftp-clientpayloadftp-server

How to insert client ip source inside FTP payload


I've scenario where ftp client and server are separe with a proxy server. I want to insert ip source address into ftp client payload so that the ftp server can retrieve it. The problem is that i don't know how to proceed. Help me out please. With regards.


Solution

  • FTP is text-based protocol.

    If you can re-implement both the client and the server, just make them understand a new command for your purpose.

    E.g. you can have the client send a XIP command just after authentication (or even before, if you need):

    XIP 203.0.113.0
    

    The server will just parse the IP and respond something like this (to follow the FTP specification):

    200 OK
    

    And then carry on as in a normal FTP session.