1

I have set up a FTP server on my laptop using IIS manager. I can access it by typing ftp://192.168.1.xxx (my laptop's internal IP), but only on the laptop I have set up the server.

I have set up port forwarding on my router (External port: 20-20, Internal port: 21-21, protocol: TCP), however, the warning:

"Note: Access to the modem FTP Server via FTP port change to 2121 on the WAN. On the LAN is still on port 21." appears.

The site is inaccessible on any other device that is on the same network.

Below is the screenshot of the port forwarding options:

https://imgur.com/a/svtr6

  • @DavidPostill Thank you for the reply. FTP Server is allowed to communicate on private and public networks (imgur.com/a/zOEEo), but the FTP server is still inaccessible. However, if Windows Firewall is completely turned off, it is accessible. How could I solve this problem? – George Tian Dec 10 '17 at 11:32
2

The site is inaccessible on any other device that is on the same network.

I have set up port forwarding on my router (External port: 20-20, Internal port: 21-21, protocol: TCP), however, the warning:

"Note: Access to the modem FTP Server via FTP port change to 2121 on the WAN. On the LAN is still on port 21." appears.

Port forwarding on the router will only affect external access. You need to change the local firewall settings on the laptop.

However, if Windows Firewall is completely turned off, it is accessible.

See below for instructions.


How to Configure Windows Firewall for a Passive Mode FTP Server

Configure the FTP service to only use a limited number of ports for passive mode FTP

  • In the IIS 7.0 Manager, in the Connections pane, click the top node for your server.

  • In the details pane, double-click FTP Firewall Support.

  • Enter the range of port numbers that you want the FTP service to use. For example, 41000-41099 allows the server to support 100 passive mode data connections simultaneously.

  • Enter the external IPv4 address of the firewall through which the data connections arrive.

  • In the Actions pane, click Apply to save your settings.

You must also create a firewall rule on the FTP server to allow inbound connections on the ports you configured in the previous procedure. Although you could create a rule that specifies the ports by number, it is easier to create a rule that opens any port on which the FTP service is listening. You limit the ports on which FTP is listening by following the steps in the previous procedure.

Configure an inbound firewall rule to allow inbound FTP connections to only the ports on which FTP is listening

  • Open an Administrator command-prompt. Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as Administrator.

  • Run the following command:

    netsh advfirewall firewall add rule name=”FTP Service” action=allow service=ftpsvc protocol=TCP dir=in
    
  • Finally, disable stateful FTP filtering so that the firewall does not block any FTP traffic.

    netsh advfirewall set global StatefulFTP disable
    

Source How to Configure Windows Firewall for a Passive Mode FTP Server

  • Thanks again. In IIS manager, the data port range was greyed out. Instead, I allowed inbound and outbound traffic on ports 20 and 21 in 'Windows Defender Firewall with Advanced Settings', which worked when tested on both internal and external networks. – George Tian Dec 10 '17 at 22:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.