Unable to connect to FTP server from another computer with FileZilla

3

1

I created an FTP server on my local Windows 7 machine with IIS.

I can connect to the server with the machine on which I created the server, but I can't connect to the server with my laptop which is in the same local network as the machine with FTP server on it.

I configured passive mode in FileZilla and port forwarding on the router.

But the problem is always the same:

Connection timed out

Any ideas?

Matic1911

Posted 2016-01-22T08:41:40.470

Reputation: 33

1Any software firewalls on the machine? Have you checked IIS is listening for all IP's? Port forwarding is not necessary within the same local network. – Jonno – 2016-01-22T08:44:02.717

Yes it was the firewall problem. Thank you for help. – Matic1911 – 2016-01-23T20:55:51.647

Answers

7

The connection is most probably blocked by the Windows firewall.

While the Windows firewall is automatically configured with rules for the ports 21, 990 and 1024-65535, when IIS FTP server is installed, the rules are not enabled initially.

To enable or change the rules, go to Control Panel > System and Security > Windows Firewall > Advanced Settings > Inbound Rules and locate three "FTP server" rules. If the rules are not enabled, click on Actions > Enable Rule.

For details, see my guide for Installing a secure FTP server on Windows using IIS.

Martin Prikryl

Posted 2016-01-22T08:41:40.470

Reputation: 13 764

Thank you for that it works now! Do you know how can I configure client to use only port 21? Because now I have passive mode enabled and ports between 50000 - 51000. – Matic1911 – 2016-01-22T15:54:25.780

You are welcome. Though on Super User we thank by accepting the answer.

– Martin Prikryl – 2016-01-22T15:55:43.493

Can you please see my updated question? – Matic1911 – 2016-01-22T15:56:40.623

The problem is that when I connect from client with FileZilla the port is random between 50000 - 51000. I need port to be 21 because I wrote a proxy for educational purpose and I would like to listen to traffic. – Matic1911 – 2016-01-22T16:01:42.953

FTP protocol needs a separate port for data connections. You cannot do with only port 21. You can reduce the data connection port range to a single port number. But it has to be distinct to 21. – Martin Prikryl – 2016-01-23T08:11:25.513

If I understand right. FTP uses port 21 for connection and other ports in my case ports 50000 - 51000 for data transfer. Am I right? – Matic1911 – 2016-01-23T14:43:08.273

That's correct. See my article on FTP connection modes for details.

– Martin Prikryl – 2016-01-23T19:53:14.343

You write amazing articles - thank you for that. Also thank you for all the help with my questions. – Matic1911 – 2016-01-23T20:59:15.293

For me, after enable the firewall rule, I changed back my ftp service port to 21, and restart my computer, and it finally works. – luochen1990 – 2019-05-08T16:23:42.810