Can’t connect to a local FTP – “Connection closed by remote host.”

ftpiislanremotevpn

I'm getting baffled by a seemingly simple problem: When I connect via VPN to my remote network, I can't connect via FTP to my FTP server – but I can do everything else (including Remote Desktop).

I've tried completely disabling the remote Firewall and I can ping the FTP Server successfully, but I still can't FTP to it.

If I use the command prompt I get:

ftp> open 10.0.2.1
Connected to 10.0.2.1.
Connection closed by remote host.

I thought it was probably the Firewall… but obviously it's not. What else could be blocking it?

It's a Windows Server 2008 R2 machine running IIS7 (natch). On the machine itself I can navigate to ftp://localhost and see the files, I just can't do it when I'm "local" to it via VPN.

Thanks for any help, I'm sure it's something really simple…!

Best Answer

If you can connect you have port 21 opened. However that is not all that is needed as port 21 is just control port and an FTP server opens other ports for actual data transmission. See if there is something within your firewall config that can unblock FTP as a whole service (not just port 21).

Also you should probably stay away from FTP Active connections and do Passive instead. Unfortunately the ftp command supports only active ones.

Set IE to do passive mode and try using it from other machine like ftp://10.0.2.1.

Related Question