FTPMonitor / Guides / FTP passive mode firewall issues

FTP passive mode firewall issues

Why FTP PASV fails behind firewalls/NAT and how to configure passive ports correctly.

Diagnose this automatically

Test whether the server allows directory listing with valid credentials.

terminal
npx ftpmonitor check --protocol ftp --host ftp.example.com --port 21 --username user --password pass --path /incoming
Shareable output
terminal
npx ftpmonitor check --protocol ftp --host ftp.example.com --port 21 --username user --password pass --path /incoming --format slack --copy

Prefer the browser? Run the same check on the homepage.

FTP uses separate control + data channels. Passive mode requires a range of server ports to be open.

Many “can login but cannot list” failures are passive-mode port issues.

Symptoms

  • Auth succeeds but LIST hangs or times out
  • Data connection errors after PASV response
  • Works on LAN but fails from outside network

Fix checklist

  1. Configure a fixed passive port range on the server.
  2. Open that passive range in the firewall/security group.
  3. Ensure the server advertises the correct public IP in PASV responses (NAT).
  4. If possible, prefer SFTP to avoid FTP data-channel complexity.

Quick tests

lftp -e 'set ftp:passive-mode true; ls; quit' -u user,pass <host>
Related
Diagnostics powered by FTPMonitor CLI