DevOps

What is Extended Passive Mode in FTP? Explained Simply

What is Extended Passive Mode in FTP? Explained Simply

If you’ve worked with FTP (File Transfer Protocol), you might have seen a message like:

Entering Extended Passive Mode (|||34647|)

Short answer: this is a normal FTP message, not an error. The server is saying: open the data connection to me on port 34647, at the same address you are already connected to. If the transfer then hangs, a firewall is blocking that port.

At first glance, this cryptic output might seem confusing. But don’t worry, it is a perfectly normal part of modern FTP connections. In this post, I break it down in plain English.

What is FTP Passive Mode?

FTP works with two types of connections:

  1. Control connection: where commands are sent.
  2. Data connection: where actual files or directory listings are transferred.

In Passive Mode (PASV), the client tells the server:
“I’ll connect to you for the data transfer. Just tell me the IP address and port number.”

This works well behind firewalls or NAT (Network Address Translation) setups, where incoming connections are often blocked.

What is Extended Passive Mode (EPSV)?

Extended Passive Mode (EPSV) is a modernized version of Passive Mode, introduced to simplify FTP over both IPv4 and IPv6.

Instead of telling the client both an IP address and a port, the server only tells it the port, assuming the client is already connected to the correct IP.

For example:

Entering Extended Passive Mode (|||34647|)

This means:

  • The server is ready for a data transfer on port 34647.
  • The client should connect back to the server’s same IP address (used in the control connection), on port 34647.

Why is EPSV Used?

EPSV is:

  • More compatible with NAT and firewalls
  • Simpler (less to parse)
  • Required for IPv6 connections
  • More secure (prevents some spoofing scenarios)

It’s commonly the default mode in modern FTP clients like FileZilla, WinSCP, or lftp.

When to Use or Disable EPSV

Most of the time, EPSV works flawlessly. But in some edge cases (usually involving misconfigured firewalls or proxies), you might run into issues like:

  • Directory listings hanging
  • File uploads or downloads timing out

In those cases, switching back to classic PASV mode (or even Active mode, as a last resort) might help.

How to switch from EPSV to PASV:

  • FileZilla:
    Settings → FTP → Passive mode → Use fallback mode
  • lftp:
    Use set ftp:use-epsv off
  • Command line FTP:
    It depends. Some clients don’t even support EPSV.

Conclusion

If you see:

Entering Extended Passive Mode (|||34647|)

…that’s a good thing! Your client and server are communicating over a modern, compatible method.

Only dig into the settings if you’re running into connection problems.

Still stuck? Check the passive port range on the server and make sure the firewall allows it. That is where most passive mode failures come from.

If you run the server, put the passive port range and its firewall rule in your server setup checklist. Then this error never reaches a developer’s desk.

FAQ

What does “Entering Extended Passive Mode (|||34647|)” mean?
The FTP server is ready for a data transfer on port 34647. The client should connect to the same server address it already uses, on that port. It is normal, not an error.

Why does FTP hang after Entering Extended Passive Mode?
Usually a firewall or NAT device blocks the passive data port. Open the server’s passive port range in the firewall, or switch the client to classic PASV mode.

What is the difference between PASV and EPSV?
PASV returns an IP address and a port. EPSV returns only the port and reuses the control connection’s address, which works with IPv6 and through NAT.

Want to talk about this kind of work?

I am a hands-on senior engineer with 15+ years building and running production systems. I am open to senior engineering and technical lead roles.