Technical Anshu
Tutorials Blog
🌐 FTP NAT and Passive Mode

FTP Works on LAN but Not From Outside Internet Fix

Login works in the office, fails from outside — or worse, the login succeeds outside and then the folder listing hangs. That pattern has one classic cause, and it is not your password.

✍️ Technical Anshu🪟 IIS FTP Server⏱️ 10 minute fix
🎥 The full deployment is in the video — the FTP feature install, users, folder permissions, firewall and passive mode, shown live step by step

This is the most reported FTP problem in the world, and it confuses everyone the first time: the same server, the same user, the same password works inside the LAN and fails from the internet. Nothing is wrong with your site or your user. FTP uses two connections, and a home or office router only knows about the first one. Understand the two connections and the fix becomes obvious — but read the honesty note at the end before you leave an FTP server facing the internet at all.

FileZilla — The Classic Outside-Connection Failure
Status: Connecting to 203.0.113.5:21... Status: Connection established, waiting for welcome message... Status: Logged in Status: Retrieving directory listing... Command: PASV Response: 227 Entering Passive Mode (192,168,1,10,195,80) Command: MLSD Error: Connection timed out after 20 seconds of inactivity Error: Failed to retrieve directory listing
Notice the reply contains the LAN address 192,168,1,10 — the client outside is told to connect to an address that only exists inside the office.
1

The Two Connections FTP Really Uses

Port 21 is only the control connection — login and commands. Every file and every folder listing travels on a second, separate data connection. In passive mode (the mode FileZilla and browsers use by default), the server replies to PASV with an IP address and a port and says: connect to me here. Inside the LAN that reply is correct. Across a router it usually is not, for two separate reasons — the address and the ports.

2

Problem One — The Server Announces Its LAN Address

By default IIS answers the PASV command with the server's own IP — its private LAN address like 192.168.1.10. A client on the internet receives that reply and tries to reach an address that does not exist on the internet, so the listing times out exactly as in the panel above.

The fix lives in IIS Manager → the server name node → FTP Firewall Support: in the field External IP Address of Firewall, enter the router's public IP address. IIS then writes that public address into PASV replies instead of its LAN address.

3

Problem Two — The Data Ports Are Not Forwarded

Even with the right address, the client now connects to a random port in the server's passive range — and the router drops it, because you only forwarded port 21. FTP needs the whole system in agreement:

  1. In FTP Firewall Support, set a fixed Data Channel Port Range, for example 50000-50100.
  2. Open that same range inbound in Windows Firewall on the server.
  3. In the router, forward port 21 and ports 50000-50100, all to the server's fixed LAN IP.
  4. Restart the FTP service: net stop ftpsvc then net start ftpsvc.
4

Test From a Truly Outside Network

Testing from another PC on the same LAN proves nothing about the router. Test from a phone on mobile data with Wi-Fi off, or from home. In FileZilla, watch the log: a correct setup shows the PASV reply carrying your public IP, and the listing appears. If login works but listing still hangs, one of the three places above is still missing the range — check them in order: IIS range, Windows Firewall, router forward. The passive-mode page in this series has the complete end-to-end checklist.

5

The Honesty Gate Before You Leave It Open

Now the part most tutorials skip. The moment this fix works, anyone on the internet can reach your FTP login — and plain FTP sends the password in clear text on every connection, readable by any network between the client and you. Attackers scan for open port 21 constantly, and the log page in this series shows what their attempts look like.

The professional options are: put the FTP server behind a VPN so it is never directly public, switch the site to FTPS with a certificate, or move internet file exchange to SFTP. Opening plain FTP to the internet to save ten minutes is a decision admins regularly regret.

🔴 One rule before anything else: classic FTP sends the username, the password and every file in plain readable text. Inside a trusted office LAN it still has honest uses. On the open internet it does not — there the answer is FTPS or SFTP, and these pages will keep saying so.

🎥 Watch the Complete FTP Server Deployment

The video sets up the whole FTP server on Windows live — including the fast automated route — so you can follow it on your own server, click by click.

▶️ Watch Full Video
❓ Common Questions (FAQ)

Why does the login succeed but the folder listing fail

Because the login travels on port 21, which you forwarded, while the listing travels on a passive data port, which you did not. Two connections, two different fates — that split is the signature of this exact problem.

Can I just forward a huge port range instead of fixing a small one

You can, and it works, but you have opened thousands of doors into your server for one service. Fix a small range like 50000-50100 in IIS and forward only that. It is the same effort and a much smaller attack surface.

My client uses active mode and still fails outside

In active mode the server connects back to the client, so now the client's router and firewall must accept an inbound connection — which most block. That is why passive mode is the standard answer for clients behind NAT.

This guide is based on the Technical Anshu video — Windows FTP Server Deployment Guide for IT Admins • Stuck on a step — ask in the video comments and you will get an answer there 🙏