简体   繁体   English

Windows 7 IIS FTP问题

[英]Windows 7 IIS FTP issue

I've been trying to set up a ftp server using IIS from windows 7. I've been succesfull on my local network but now I want to make it public. 我一直在尝试从Windows 7使用IIS设置ftp服务器。我在本地网络上已经成功,但是现在我想将其公开。 I portforwarded port 21, but now when I open up my ftp server externally (ftp://myexternalip) I do get prompted for a username and password, but when I log in I get this log: 我将端口21进行了端口转发,但是现在当我从外部打开ftp服务器(ftp:// myexternalip)时,系统会提示我输入用户名和密码,但是登录时会得到以下日志:

Command:    OPTS UTF8 ON
Response:   200 OPTS UTF8 command successful - UTF8 encoding now ON.
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is current directory.
Command:    TYPE I
Response:   200 Type set to I.
Command:    PASV
Response:   227 Entering Passive Mode (192,168,178,14,57,219).
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
Error:  Failed to retrieve directory listing

Consequently I get to see none of the data/files in my ftp server.. I've got no clue what the issue is here nor how to solve this. 因此,我看不到ftp服务器中的任何数据/文件。我不知道这里的问题是什么,也不知道如何解决。 I'm also certain that my firewall isn't blocking the ftp server, because I turned it off. 我也可以确定我的防火墙没有阻止ftp服务器,因为我将其关闭了。 Anyone with more knowledge that can enlighten me? 有更多知识可以启发我吗?

The FTP protocol is different to other protocols, in that it uses not only a dedicated port (21) over which the commands go (this is why you can login etc.) but uses spontaneous other ports for the transmission of the data payload. FTP协议与其他协议不同,它不仅使用命令通过的专用端口(21)(这就是您可以登录等的原因),而且还使用其他自发端口来传输数据有效负载。

This was not a problem, when FTP was designed and client and server typically saw themself directly (and firewalls were exotic), but NAT changes the game: The address your server sees (192.168.178.14) is not visible from the internet. 这不是问题,当设计FTP时,客户端和服务器通常可以直接看到它们自己(防火墙是奇特的),但是NAT改变了局面:您的服务器看到的地址(192.168.178.14)在Internet上不可见。

The only way to fix it is on the NAT: A connection tracking module there will actually intercept and manipulate the command channel to translate NATed addresses/ports into public addresses/ports. 修复它的唯一方法是在NAT上:那里的连接跟踪模块实际上将拦截并操纵命令通道,以将经过NAT处理的地址/端口转换为公用地址/端口。 Most firewall appliances know how to do this. 大多数防火墙设备都知道如何执行此操作。

In your firewall look for "trigger applications" or "FTP forwarding". 在防火墙中查找“触发应用程序”或“ FTP转发”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM