2013-12-11 67 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需要了解層協議,並在轉發該數據之前進行必要的數據包修改。