NICMx / Jool

SIIT and NAT64 for Linux
GNU General Public License v2.0
326 stars 66 forks source link

Feature request: Support for RFC 6384 (FTP ALG) #114

Open toreanderson opened 9 years ago

toreanderson commented 9 years ago

Currently, FTP won't work through Jool's NAT64, as shown here from an IPv6-only client:

$ wget -O/dev/null ftp://ftp.uib.no/pub/BUPDATA/BUPKURS_ODBC.doc
--2014-11-18 16:31:42--  ftp://ftp.uib.no/pub/BUPDATA/BUPKURS_ODBC.doc
           => ‘/dev/null’
Resolving ftp.uib.no (ftp.uib.no)... 64:ff9b::81b1:1e1b
Connecting to ftp.uib.no (ftp.uib.no)|64:ff9b::81b1:1e1b|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/BUPDATA ... done.
==> SIZE BUPKURS_ODBC.doc ... 107520
==> EPSV ... ==> LPSV ... 
Cannot initiate PASV transfer.
==> EPRT ... [...hangs...]

A packet capture shows why it fails:

507 453.802038 2a02:c0:400:104:225:b5ff:fe02:9c -> 64:ff9b::81b1:1e1b FTP 94 Request: EPSV 2
508 453.808675 64:ff9b::81b1:1e1b -> 2a02:c0:400:104:225:b5ff:fe02:9c FTP 117 Response: 522 Bad network protocol.
509 453.808749 2a02:c0:400:104:225:b5ff:fe02:9c -> 64:ff9b::81b1:1e1b FTP 92 Request: LPSV
510 453.815331 64:ff9b::81b1:1e1b -> 2a02:c0:400:104:225:b5ff:fe02:9c FTP 112 Response: 500 Unknown command.

RFC 6384 specifices how a NAT64 could rewrite FTP protocol data in order to make this work. Perhaps that would be a nice feature addition for Jool?

SilentT-FR commented 9 years ago

The problem apear only when the ftp server was in passive mode

ydahhrk commented 9 years ago

The problem apear only when the ftp server was in passive mode

This is a little strange. The RFC says both "active" and "passive" should fail. "extended passive" is the only one that should work by default.

When you say "only in passive mode", were you considering "active" mode?

SilentT-FR commented 9 years ago

Sorry for the mistake yes in active and pasive mode fail just the Extended passive mode works

ydahhrk commented 8 years ago

(I'm updating issue status.) There is no way this is going to make it for the next release; everything else is already in the testing phase while FTP is still in diapers and looking moody. Clearing milestone.

wangchuanfang commented 5 years ago

Dear ydahhrk, is the feature of FTP support in development? When is it expected to come out

ydahhrk commented 5 years ago

It's behind Debian Packaging and startup scripts. Probably about a year.

wangchuanfang commented 5 years ago

Thank you very much for your reply. I am looking forward to the release of the new version as soon as possible