Windows Server 2016 IIS 10 FTP access to website doesn't connect

6,772

I solved it myself

After reading few more articles and forums, I discovered that Passive mode was not working correctly hence the errors.

This was due to Amazon AWS EC2 Security groups, server Firewall and FTP server setup.

1- AWS Security group was set to accept Passive FTP TCP connections from port range 40,000-51,000 only.

2- Server Firewall had to be configured to accept FTP SERVER connections from above port range as well.

3 - FileZilla (Or any other FTP server) had to be configured to accept Passive connections from above port range only.

It took me a while to figure it out. If server security is high on your list, as it should be, this was the issue and the fix.

Hope this saves you some time. Good luck everyone!

Share:
6,772

Related videos on Youtube

Daniel PurPur
Author by

Daniel PurPur

By day I program for some big house hold names and marketing agencies. by night I am a party ninja! Started programmimg on VB, C++ and ASP but moved to freesource LAMP & LEMP as former was getting too expensive and world was moving towards free source. I do Linux & a bit of microsoft too, also got my Cisco CCNA and CCNP for fun, it is expired now but i have a very good knowledge of networks. I have done designs and a lot of front end coding but very little of new JS frameworks. I am basically what it is commonly known as "Jack of all Trades BUT master of few!".

Updated on September 18, 2022

Comments

  • Daniel PurPur
    Daniel PurPur over 1 year

    I Have a problem with FTP setup on a windows server 2016. I have tried anything that there is on the forums and they all say the same thing.

    I have created the site and can access it internally and externally with hostname and IP address (IP has not been included for security reasons), doing all the hostname and IP bindings. Could not connect using FileZilla.

    Tried creating a FTP site and all the bindings and connecting to it, did not happen!

    Procedure I followed

    1 - add website ... IP address (All Unassigned, because I am hosting it on one server only)

    2 - bind the host name www.my-domain.com

    3 - allow all inbound rules on firewall (port 80, 21, 990 ,...)

    MESSAGE I GET IN FILEZILLA:

    Status: Connecting to 00.00.000.000:21... (IP excluded for Security reasons)
    Status: Connection established, waiting for welcome message...
    Response:   220 Microsoft FTP Service
    Command:    USER myusername
    Response:   530 Valid hostname is expected.
    Error:  Could not connect to server
    
    • Drifter104
      Drifter104 almost 7 years
      Remove the hostname from the bindings
    • Daniel PurPur
      Daniel PurPur almost 7 years
      Hi I have and now I get: Status: Connection established, waiting for welcome message... Status: Logged in Status: Retrieving directory listing... Status: Server sent passive reply with unroutable address. Using server address instead. Command: LIST Response: 150 Opening BINARY mode data connection. Error: Connection timed out after 20 seconds of inactivity Error: Failed to retrieve directory listing
    • Drifter104
      Drifter104 almost 7 years
      This question/Answer should answer that for you serverfault.com/questions/718662/…
    • Daniel PurPur
      Daniel PurPur almost 7 years
      Thanks @Drifter104. it was great help. it was Passive ports