Visual RFC.
ALL RFCs / RFC 2428
Read the RFC ↗
RFC 2428 / FTP DATA CONNECTIONS

Close an unsuitable listener before retrying

05

In proxy FTP the default control-family listener may not suit the other server. Abort that listener, then request the needed network protocol.

RFC 2428 · § 3EXAMPLE
4 / 4
04
Request family 2 and read the outcome

After cleanup, EPSV 2 asks for IPv6. A supported chosen server creates a new listener; an unsupported alternative returns 522 (1) and creates none.

Close an unsuitable listener before retryingAfter cleanup, EPSV 2 asks for IPv6. A supported chosen server creates a new listener; an unsupported alternative returns 522 (1) and creates none.Request family 2 and read the outcometimeEPSV → family 1 listenerABOR → close old listenerEPSV 2 → request family 2Supported: chosenIPv6 listenerUnsupported:522 … (1)Alternatives after old-listener cleanup

Key idea: ABOR cleans up the old listener; a new protocol request is a separate decision.

Terms
FTP
File Transfer Protocol. Its control connection carries commands; a separate data connection carries a file or directory listing.
Client / server
The client sends FTP commands. Which side opens the data TCP connection is a separate choice.
Address family
The network protocol number: 1 for IPv4 and 2 for IPv6 in these examples.
Passive mode
The server listens for a data TCP connection that the connecting peer opens.

Look up a term in the glossary ↗

Rules & examples
  • Without an argument EPSV selects the network protocol of the control connection. In this proxy fixture that is family 1, while the other data peer supports only family 2.
  • If the returned protocol is unsupported by the host that will connect, the client MUST issue ABOR to let the server close the listening connection. It can then send EPSV <net-prt> for a specific family.
  • A server supporting the requested protocol SHOULD use it. Otherwise it MUST return the 522 response defined in §2, including its supported-protocol list. Do not turn SHOULD into an unconditional successful-listener promise.
  • The supported and unsupported results are alternatives after cleanup. A different-family server address must be known separately in this proxy setup; it is not returned in the blank EPSV address field. Full proxy routing, authorization and FTP transfer-state machinery remain outside this example.

Documentation addresses and chosen listening ports. Each chapter is a separate bounded example; FTP authentication, authorization, file commands and transfer replies are not a complete FTP implementation here. EPRT/EPSV provide no encryption or guaranteed reachability.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background
commandsfile bytes

Commands arrange a separate file connection

Imagine arranging a delivery by phone, then opening a separate delivery entrance. EPSV asks the server to listen; EPRT can describe another receiving endpoint in a proxy setup. The analogy separates arranging a connection from moving the file and does not promise access through a firewall.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

All chapters in RFC 2428

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗