Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: PASV gives wrong port to client - logs show correct information. #1853

Open
2 tasks done
mrforsythexeter opened this issue Dec 29, 2024 · 2 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@mrforsythexeter
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration issue.
  • This issue is not already reported on Github (I've searched it).

Bug description

The "response" issued to the FTP client doesn't match the internal SFTPgo logs for the PASV response (see logs below)

Port as shown as a response in FZ is 231*256+125=59261

Port as shown in SFTPgo Logs 195*256+139 = 50059

Port issued from SFTP logs is valid and correct, port show in FZ as the response (also telnet) is not valid for the passive port range.

Steps to reproduce

  1. docker setup latest
  2. configure passive port range 50000-50100
  3. try and connect without TLS

Expected behavior

Response given to the client to match what is shown in the logs.

SFTPGo version

2.6.4 386448e

Data provider

Me?

Installation method

Community Docker image

Configuration

Passive Port Range 50000-50100
Fixed Passive external IP address (issued correctly via logs and shown correct in FZ)

Relevant log output

Using FileZilla as a client, but seen the same in telnet.

(!! IP changed for security)
Command:	CWD /
Response:	250 CD worked on /
Command:	TYPE I
Response:	200 Type set to binary
Command:	PASV
Response:	227 Entering Passive Mode (255,255,227,215,231,125)

Logs from SFTPgo
{"level":"debug","time":"2024-12-29T21:56:35.386","sender":"ftpserverlib","server_id":"FTP_0","clientId":"12","line":"PASV","message":"Received line"}
{"level":"debug","time":"2024-12-29T21:56:35.386","sender":"ftpserverlib","server_id":"FTP_0","clientId":"12","line":"227 Entering Passive Mode (255,255,227,215,195,139)","message":"Sending answer"}

What are you using SFTPGo for?

Professional user, 1 person business

Additional info

No response

@mrforsythexeter mrforsythexeter added the bug Something isn't working label Dec 29, 2024
@mrforsythexeter
Copy link
Author

I am thinking this is the modem on that port (it must be "trying" to be clever, Dirty deep packet manipulation). Moving it to a different port on the NAT, doesn't seem to have this effect.

@drakkan
Copy link
Owner

drakkan commented Dec 30, 2024

I am thinking this is the modem on that port (it must be "trying" to be clever, Dirty deep packet manipulation). Moving it to a different port on the NAT, doesn't seem to have this effect.

Yes, it is unlikely that this is an issue in SFTPGo, it would affect all users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants