Internet Engineering Task Force                             T. Tsou, Ed.
Internet-Draft                                 Huawei Technologies (USA)
Updates: 6384 (if approved)                                 S. Perreault
Intended status: Informational                                  Viagenie
Expires: December 17, 2012                                      J. Huang
                                                     Huawei Technologies
                                                           June 15, 2012


  An FTP Application Layer Gateway (ALG) for IPv4-to-IPv6 Translation
                       draft-tsou-behave-ftp46-00

Abstract

   An FTP ALG for NAT64 was defined in RFC 6384.  Its scope was limited
   to an IPv6 client connecting to an IPv4 server.  This memo updates
   RFC 6384 with the case of an IPv4 client connecting to an IPv6
   server.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on December 17, 2012.

Copyright Notice

   Copyright (c) 2012 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of



Tsou, et al.            Expires December 17, 2012               [Page 1]


Internet-Draft                    FTP46                        June 2012


   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.


Table of Contents

   1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . . . 3
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3
   3.  Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
   4.  PASV to EPSV  . . . . . . . . . . . . . . . . . . . . . . . . . 4
   5.  EPSV (IPv4) to EPSV (IPv6)  . . . . . . . . . . . . . . . . . . 5
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
   7.  Security Considerations . . . . . . . . . . . . . . . . . . . . 6
   8.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . 6
   9.  Normative References  . . . . . . . . . . . . . . . . . . . . . 6
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . . . 6


































Tsou, et al.            Expires December 17, 2012               [Page 2]


Internet-Draft                    FTP46                        June 2012


1.  Overview

   During the transition from IPv4 to IPv6, some operators need to
   deploy NAT in their network.  Some subscribers have the need to run
   IPv4 based FTP servers at home, and some of the FTP [RFC0959] control
   messages carry IP address and port number in the payload, which will
   cause a NAT traversal problem.

   [RFC6384] defines FTP ALG for NAT64, but only for the case where the
   FTP client is on the inside of the NAT64.  The case where an FTP
   server is on the inside of the NAT64 is not covered.

   When the FTP server is behind NAT, it can publish its service address
   via a redirect server located in the internet, or via modified DDNS
   system, or other possible methods.  It is out of the scope of this
   memo.

1.1.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].


2.  Terminology


3.  Scenarios

   There can be several scenarios if NAT is involved.

   In this scenario, the FTP client is behind NAT, FTP ALG need to
   handle the EPRT / PORT command in FTP active mode, translate the IP
   address and port.  This scenario has been covered by [RFC6384], but
   only for NAT64.  This scenario for other kinds of NAT has not been
   covered.

           +--------+    +-------+     +----------+    +--------+
           |   FTP  |    |       |     |          |    |  FTP   |
           | Client |----+  NAT  + ----+ Internet +----+ Server +
           |        |    |       |     |          |    |        |
           +--------+    +-------+     +----------+    +--------+

                      Figure 1: FTP Client Behind NAT

   If the FTP server is behind a NAT, in FTP passive mode, the EPSV /
   PASV command and the response will be processed by FTP ALG.  In case
   of NAT64, the FTP server is IPv6 based.



Tsou, et al.            Expires December 17, 2012               [Page 3]


Internet-Draft                    FTP46                        June 2012


            +--------+    +----------+     +-----+    +--------+
            |   FTP  |    |          |     |     |    |  FTP   |
            | Client |----+ Internet + ----+ NAT +----+ Server +
            |        |    |          |     |     |    |        |
            +--------+    +----------+     +-----+    +--------+

                      Figure 2: FTP Server Behind NAT

   This scenario is the combination of the above two scenarios, ALG is
   required for both active and passive modes, translating both the IP
   address and port.

      +--------+    +-----+    +----------+     +-----+    +--------+
      |   FTP  |    |     |    |          |     |     |    |  FTP   |
      | Client |----+ NAT +----+ Internet + ----+ NAT +----+ Server +
      |        |    |     |    |          |     |     |    |        |
      +--------+    +-----+    +----------+     +-----+    +--------+

                Figure 3: FTP Server and Client Behind NAT


4.  PASV to EPSV

   If FTP client issues PASV command to FTP server, FTP ALG translates
   PASV command into EPSV command [RFC2428], setting the "net-prt" field
   to 2 (IPv6).  The response of EPSV command is translated into PASV
   response.  FTP ALG allocates an IPv4 address and port for the EPSV
   response message, and builds a NAT mapping entry if the NAT is
   stateful.  The source address of the EPSV response message and the
   "tcp-port" in the payload are used for the NAT mapping.  The
   allocated IPv4 address and port are put into the PASV response
   message.

   For instance, in the IPv4 side of NAT64, FTP server's address is
   100.1.1.10.  FTP client issues a PASV command to FTP server, and it
   is translated into EPSV command by FTP AGL, as shown below:

   PASV command:

   PASV

   EPSV command:

   EPSV 2

   When FTP server returns a success response of EPSV containing tcp-
   port 3000, FTP AGL allocates an IPv4 address 100.1.1.10 and tcp-port
   2000 corresponding to the tcp-port 3000 in the EPSV response message,



Tsou, et al.            Expires December 17, 2012               [Page 4]


Internet-Draft                    FTP46                        June 2012


   and puts the allocated IP address and port into PASV response
   message, as shown below:

   EPSV success response:

   229 Entering Passive Mode (|||3000|)

   PASV success response:

   227 Entering Passive Mode (100,1,1,10,7,208)


5.  EPSV (IPv4) to EPSV (IPv6)

   If FTP client issues EPSV command to FTP server, FTP ALG modifies the
   "net-prt", change the value from 1 (IPv4) to 2 (IPv6).  The response
   of IPv6 EPSV command is also translated.  FTP ALG allocates an IPv4
   address and port for the EPSV response message.

   [RFC2428] requires that "the network address used to establish the
   data connection will be the same network address used for the control
   connection", so NAT MUST to make sure that IPv4 address for control
   connection and IPv4 address for data connection for a FTP server must
   be the same, which means all the mappings for an IPv6 address MUST
   have the same external IPv4 address.

   For instance, in the IPv4 side of NAT64, FTP server's address is
   100.1.1.10.  The FTP client issues an IPv4 EPSV command to FTP
   server, and it is translated into IPv6 EPSV command by FTP AGL, as
   shown below:

   EPSV (IPv4) command:

   EPSV 1

   EPSV (IPv6) command:

   EPSV 2

   When FTP server returns a success response of EPSV containing port
   3000, FTP AGL will allocate an IPv4 address 100.1.1.10 and port 2000
   corresponding to the port 3000 in the EPSV response message, and put
   the allocated port into PASV response message, as shown below:

   EPSV (IPv6) success response:

   229 Entering Passive Mode (|||3000|)




Tsou, et al.            Expires December 17, 2012               [Page 5]


Internet-Draft                    FTP46                        June 2012


   EPSV (IPv4) success response:

   229 Entering Passive Mode (|||2000|)


6.  IANA Considerations

   This memo includes no request to IANA.


7.  Security Considerations

   This memo does not involve security issues.


8.  Acknowledgements


9.  Normative References

   [RFC0959]  Postel, J. and J. Reynolds, "File Transfer Protocol",
              STD 9, RFC 959, October 1985.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2428]  Allman, M., Ostermann, S., and C. Metz, "FTP Extensions
              for IPv6 and NATs", RFC 2428, September 1998.

   [RFC6384]  van Beijnum, I., "An FTP Application Layer Gateway (ALG)
              for IPv6-to-IPv4 Translation", RFC 6384, October 2011.


Authors' Addresses

   Tina Tsou (editor)
   Huawei Technologies (USA)
   2330 Central Expressway
   Santa Clara  CA  95050
   USA

   Phone: +1 408 330 4424
   Email: tina.tsou.zouting@huawei.com








Tsou, et al.            Expires December 17, 2012               [Page 6]


Internet-Draft                    FTP46                        June 2012


   Simon Perreault
   Viagenie
   246 Aberdeen
   Quebec, QC  G1R 2E1
   Canada

   Phone: +1 418 656 9254
   Email: simon.perreault@viagenie.ca
   URI:   http://viagenie.ca


   Jing Huang
   Huawei Technologies
   Huawei Area F, Bantian, Longgang District
   Shenzhen  518129
   China

   Phone:
   Email: James.huang@huawei.com
































Tsou, et al.            Expires December 17, 2012               [Page 7]