【问题标题】:FTP Not working through TCP TunnelFTP 不通过 TCP 隧道工作
【发布时间】:2013-12-11 23:51:59
【问题描述】:

所以我正在使用以下软件:tcptunnel。这是一个简单的软件,基本上可以将数据包转发到另一台服务器。在这种情况下,我使用受 DDoS 保护的服务器将数据转发到不受保护的服务器,因此它不会被 ddos​​ed。

反正这里是我的 tcptunnel 命令,很标准

/root/tcptunnel/tcptunnel \
--local-port=21 \
--remote-port=21 \
--remote-host=x.x.x.x \
--bind-address=209.141.39.157 \
--fork \
--stay-alive

现在,如果我使用 x.x.x.x 正常连接到我的 FTP 服务器,它可以正常工作,尽管当使用受保护的 IP 连接时,连接开始并且似乎经过身份验证但不显示文件。

感谢任何帮助。

Status: Connecting to 209.141.39.157:21...
Status: Connection established, waiting for welcome message...
Response:   220 Multicraft 1.8.2 FTP server
Command:    USER xxxx
Response:   331 Username ok, send password.
Command:    PASS ********
Response:   230 Login successful
Command:    OPTS UTF8 ON
Response:   200 OK
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is the current directory.
Command:    TYPE I
Response:   200 Type set to: Binary.
Command:    PASV
Response:   227 Entering passive mode (x,x,x,x,96)
Command:    MLSD
Response:   150 File status okay. About to open data connection.
Error:  Connection timed out
Error:  Failed to retrieve directory listing

【问题讨论】:

    标签: ftp reverse-proxy


    【解决方案1】:

    注意 FTP 协议不是 NAT 透明的。在您的情况下,存在类似的情况。对于retrieve 命令,ip 地址是原始用户的ip 地址。如果你只是将此命令转发到你的服务器,服务器会尝试直接向原始用户发送数据,这会失败。

    要完成这项工作,tcptunnel 需要了解上层协议,并在转发该数据之前进行必要的数据包修改。

    【讨论】:

      猜你喜欢
      • 2011-12-06
      • 2018-07-25
      • 2021-11-30
      • 1970-01-01
      • 1970-01-01
      • 2011-09-20
      • 1970-01-01
      • 2011-01-17
      • 2010-12-26
      相关资源
      最近更新 更多