Reputation: 32720
I'm writing an FTP client from scratch and have trouble opening a PASV connection. The server seems to send the right port, but the client receives a different raw string and subsequently cannot connect.
This is the server log (Filezilla):
2018.07.19 16:29:44 - (not logged in) (x.x.10.33)> Connected on port 21, sending welcome message...
2018.07.19 16:29:44 - (not logged in) (x.x.10.33)> 220 Hello from FileZilla Server 0.9.60 beta
2018.07.19 16:29:44 - (not logged in) (x.x.10.33)> USER test
2018.07.19 16:29:44 - (not logged in) (x.x.10.33)> 331 Password required for test
2018.07.19 16:29:45 - (not logged in) (x.x.10.33)> PASS test
2018.07.19 16:29:45 - test (x.x.10.33)> 230 Logged on
2018.07.19 16:29:45 - test (x.x.10.33)> PASV
2018.07.19 16:29:45 - test (x.x.10.33)> 227 Entering Passive Mode (y,y,105,118,93,232)
And this is the client log (my program):
> USER test
2018.07.19 14.29.02 - 220 Hello from FileZilla Server 0.9.60 beta
2018.07.19 14.29.02 - 331 Password required for test
> PASS test
2018.07.19 14.29.02 - 230 Logged on
> PASV
2018.07.19 14.29.03 - 227 Entering Passive Mode (y,y,105,118,214,224)
The shown output is the raw data received from the socket. All server output arrives, but the 227 response has the wrong port numbers. I'm confused how this is even possible.
The connection is via VPN (OpenVPN) from Vietnam to Germany, the server is located in Germany, too. I have verified that Filezilla and my client work together when run on the same machine (no internet traffic). I've also verified that my client works with an independent server (both locally and over unsecured internet), so the problem seems to be with Filezilla?
Upvotes: 0
Views: 585