« Previous Next »

Thread: connection closed by remote host - IIS7

Last post 05-10-2008 2:17 AM by JaroDunajsky. 7 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (8 items)

Sort Posts:

  • 05-05-2008, 9:22 PM

    connection closed by remote host - IIS7

    I installed the updated version of IIS7 on Server2008 and set up a website.  While logging in via ftp localhost, it prompts for credentials and I get in just fine.  I am then able to use other commands (dir).  However, when I log in from any other computer, it logs in fine, but when I use the dir command, it says "connection closed by remote host".

    Basic and anonymous is enabled.

    Ive looked around on the net, and have seen people having issues with NAT but I dont think that is my issue?  Anyone have some advice?

  • 05-06-2008, 6:31 PM In reply to

    Re: connection closed by remote host - IIS7

    Windows firewall is likely in your way. If you have only port 21 opened, it will not be sufficient for the data transfers (directory listings, downloads and uploads of files).

    See my blog entry about how to configure windows firewall:

    http://blogs.iis.net/jaroslad/archive/2007/09/29/windows-firewall-setup-for-microsoft-ftp-publishing-service-for-iis-7-0.aspx

    Also, on the client side you should stay away from using active data connections (PORT, EPRT). Instead configure client to use passive connections. If you are using the command line ftp.exe built in the operating system, it only supports active connections :-(.

    Hope this helps.

     

     

    Jaroslav Dunajsky (MSFT, IIS)
  • 05-06-2008, 7:56 PM In reply to

    Re: connection closed by remote host - IIS7

    Thank you so much for your reply.  I learned some new things about windows firewall and FTP ports that I didnt know before reading your post.   However, I followed your steps and I am receiving the same issue.  I even went so far as to turn off the server firewall to see if that was the issue (it wasnt).  Could I be missing security settings on a folder or at the IIS level that would have this effect?

  • 05-07-2008, 12:28 PM In reply to

    Re: connection closed by remote host - IIS7

    What ftp client are you using? If you client is doing active FTP connections then the firewall issues apply to the client side as well, because with active FTP connections client and server revert roles: client is listening and server is connecting.

     

     

    Jaroslav Dunajsky (MSFT, IIS)
  • 05-07-2008, 2:25 PM In reply to

    Re: connection closed by remote host - IIS7

    I am using FileZilla, which uses passive.

  • 05-09-2008, 1:50 AM In reply to

    Re: connection closed by remote host - IIS7

    Then the only explanation I have is the firewall. You could run some network sniffing tool (ethereal, wireshark or microsoft network monitor) on client and server side and see if data connection traffic comes through. Is there about 20 second delay on the directory listing failure?

    Jaroslav Dunajsky (MSFT, IIS)
  • 05-09-2008, 11:05 AM In reply to

    Re: connection closed by remote host - IIS7

    Yes, there is about a 20 second delay when in passive mode.  (active mode - which I dont use anymore - failed instantly).

     I will try running a sniffer and see what I find.  Thanks for all of your help.

  • 05-10-2008, 2:17 AM In reply to

    Re: connection closed by remote host - IIS7

    The 20 second delay is a very likely signature that firewall most likely is preventing the the data connection to be opened. Client is trying to open TCP connection by sending SYN packet, but firewall probably causes that server never responds. Client eventually concludes that SYN packet got lost and retries 2 more times. It adds up to ~20 second delay before client gives up and reports error.

     

    Jaroslav Dunajsky (MSFT, IIS)
Page 1 of 1 (8 items)
Microsoft Communities