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

[Feature Request] - support of FTP servers running behind a NAT/proxy #16

Closed
yakov-bakhmatov opened this issue Aug 2, 2022 · 1 comment · Fixed by #17
Closed

[Feature Request] - support of FTP servers running behind a NAT/proxy #16

yakov-bakhmatov opened this issue Aug 2, 2022 · 1 comment · Fixed by #17
Assignees
Labels
new feature A new feature request

Comments

@yakov-bakhmatov
Copy link
Contributor

When an FTP server is running behind a NAT, it returns its private network IP address in response to the PASV command.

In this case, received address should be replaced with the address of the remote peer of the existing connection.

This is implemented, for example, in the Apache Commons Net library: https://github.com/apache/commons-net/blob/b1f6d1af65c67804524a616ce35d8b31f6e750df/src/main/java/org/apache/commons/net/ftp/FTPClient.java#L376

See my patch:

https://github.com/yakov-bakhmatov/suppaftp/tree/pasv-nat

@yakov-bakhmatov yakov-bakhmatov added the new feature A new feature request label Aug 2, 2022
@veeso
Copy link
Owner

veeso commented Aug 2, 2022

That's great, feel free to open a PR.

Just one thing, I would not use a feature for nat, but a client option instead.

@veeso veeso linked a pull request Aug 2, 2022 that will close this issue
@veeso veeso closed this as completed in #17 Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants