2013-12-11 65 views
-1

所以我使用以下软件:tcptunnel。这是一个简单的软件,可以将数据包基本转发到其他服务器在这种情况下,我使用受DDoS保护的服务器将数据转发到我的不受保护的服务器,因此它不会被修改。FTP不通过TCP隧道工作

反正这是我的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 

如果我连接到我的FTP服务器通常与XXXX它的作品,虽然与保护的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 

回答

0

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

为了做到这一点,tcptunnel需要了解层协议,并在转发该数据之前进行必要的数据包修改。