FTP connection issue via this router

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

FTP connection issue via this router

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
FTP connection issue via this router
FTP connection issue via this router
2013-11-17 22:59:16
Region : Others

Model : TL-MR3220

Hardware Version : V2

Firmware Version : 3.15.2 Build 130423 Rel.61823n

ISP : Invitel, Hungary


Hi,

We have this kind of router and we experienced a weird issue when we use a curl ftp client behind the router to a public ftp server.

The problem is:
- the client connects to the ftp server
- start uploading binary files (tiff)
- after some progress the uploading just hangs for a while and after a timeout, the connection closed with error code

We replaced the router with a mikrotik router, we did not change other components or software, start the uploading, it finished without error. We confirmed this behaviour several times, with different files, the result always that, the tp-link router failed, mikrotik is working well, while everything else the same.

The setup of the router:
- FTP ALG turned on, everything else off (tfpt, vpn, etc.) - with turned off FTP ALG ftp simply does not work
- SPI firewall - doesn't matter it is on or off, we left on
- Advanced security - nothing set, as default

I got a logs from the server side, it reported that, our side closed the control channel, while we are sure, our side closed only after the transfer hangs and timout reached.

Any idea?
Unfortunately I did not find any useful diagnostic tool or logs in the router.

Thank you,
István
  0      
  0      
#1
Options
2 Reply
Re:FTP connection issue via this router
2013-11-18 19:46:36
Here is my log from my ftp client:

CURL DEBUG TEXT: Remembering we are in dir "DIRECTORY01/"
CURL DEBUG HEADER_IN: 226 Transfer complete.
CURL DEBUG TEXT: Connection #0 to host ftp.xxxx.yy left intact
CURL DEBUG TEXT: Re-using existing connection! (#0) with host ftp.xxxx.yy
CURL DEBUG TEXT: Connected to ftp.xxxx.yy (xxx.xxx.xxx.xxx) port 21 (#0)
CURL DEBUG TEXT: Request has same path as previous transfer
CURL DEBUG HEADER_OUT: EPRT |1|lll.lll.lll.lll|59105|
CURL DEBUG HEADER_IN: 200 EPRT command successful.
CURL DEBUG TEXT: Connect data stream actively
CURL DEBUG HEADER_OUT: STOR image02.tif
CURL DEBUG HEADER_IN: 125 Data connection already open; Transfer starting.
CURL DEBUG TEXT: Connection accepted from server
CURL DEBUG DATA_OUT: II*
.......
.......
.......
CURL DEBUG TEXT: Remembering we are in dir "DIRECTORY01/"
CURL DEBUG HEADER_IN: 226 Transfer complete.
CURL DEBUG TEXT: Connection #0 to host ftp.xxxx.yy left intact
CURL DEBUG TEXT: Re-using existing connection! (#0) with host ftp.xxxx.yy
CURL DEBUG TEXT: Connected to ftp.xxxx.yy (xxx.xxx.xxx.xxx) port 21 (#0)
CURL DEBUG TEXT: Request has same path as previous transfer
CURL DEBUG HEADER_OUT: EPRT |1|lll.lll.lll.lll|54344|
CURL DEBUG HEADER_IN: 200 EPRT command successful.
CURL DEBUG TEXT: Connect data stream actively
CURL DEBUG HEADER_OUT: STOR image03.tif
CURL DEBUG TEXT: FTP response reading failed
CURL DEBUG TEXT: Uploaded unaligned file size (0 out of 36479 bytes)
CURL DEBUG TEXT: Closing connection #0



Here is the relevant log and answer from the maintener of the target ftp server:

In column A is a session ID, unique for each session.
In line 20, the session begins correctly, user login in etc, data transfer, session ID 59472.


Session Port Command
59472 21 EPRT
34277 20 DataChannelOpened
34277 20 DataChannelClosed
59472 21 STOR

This is not causing the error, but it seems very strange to me.
You error begins in line 120, see below.
You give a ControlChannelClosed command for session id 59472, the session will be closed by this command, but after this command you try to store data, this is not possible and causing ftp error 425, means cannot open data connection, this is the correct message, because you have closed this and cannot send any data on the session id.


Session Port Command
59472 21 ControlChannelClosed
59472 21 STOR

59748 21 USER


The strange thing is, in my log, I do not see that behaviour, what the server side log contains: close control channel and store file after that.

Thank you!
  0  
  0  
#2
Options
Re:FTP connection issue via this router
2013-11-28 17:52:22
Same issue with an other tp-link router:

Firmware Version: 5.1.2 Build 20130116 Rel.45577s
Hardware Version: TL-R470T+ v2.1

Is there any debugger or tool on the tp-link to help figure out the situation?
  0  
  0  
#3
Options