A project we work with needs some data from a third-party that is given to us through FTP, and we get the file to later process it as a part of our pipelines. It has suddenly become a problem as we can't get the data anymore. I've attempted getting the data through both active (connection hangs) and passive mode, to no success.
I've noticed that I am able to get the file when using FileZilla, so I'm sure that I could somehow reproduce what FileZilla does to get the file programmatically. The issue seems to be a configuration error on the third-party's side, as when we do requests in Passive mode, we get a local IP address from the server instead of the actual server's IP. FileZilla outputs the following:
Command: PASV
Response: 227 Entering Passive Mode (a local IP address is given here).
Status: Server sent passive reply with unroutable address. Using server address instead.
What does FileZilla do to use the server address instead
? I've tried reproducing this through manual FTP commands but haven't had any luck.