FileZilla Forums

Welcome to the official discussion forums for FileZilla
Donate to project
It is currently 2014-04-21 13:03

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2012-03-19 19:09 
Offline
500 Command not understood

Joined: 2012-03-19 19:04
Posts: 4
I believe my case is simple. Filezilla sends my server a PORT command, which tells my server what port to connect back to(on the client). After the PORT command, I do not see a process listening on the port specified. For example, if the PORT command specifies port 12345, I would think that I could do a "netstat -an | grep 12345" (using cygwin) and see a process listening for port 12345. Am I correct in this assumption? The result is that any following LIST or STOR command fails because the server cannot connect back on port 12345.

I'm testing this on windows 7. I have disabled any firewall to ensure that it is not blocking the opening of port "12345".

Thanks for any help.


Top
 Profile  
 
PostPosted: 2012-03-20 07:05 
Offline
Site Admin
User avatar

Joined: 2004-02-23 20:49
Posts: 22541
The port is only left open as long as needed. If the transfer has completed, either successfully or in error, the port is closed again. Are you sure you do netstat in that brief period of time the port is open?


Top
 Profile  
 
PostPosted: 2012-03-20 15:32 
Offline
500 Command not understood

Joined: 2012-03-19 19:04
Posts: 4
I'm running netstat between when the PORT command and STOR commands are sent. The port should be open in this window, correct? Either way, when my server tries to connect back on port 12345, the connection fails. I'm running the Filezilla client and FTP server (homegrown) locally.

If I try to send the same file using either the Windows build-in ftp or a standard unix ftp client, the PORT command is sent, which opens a port, followed by the STOR command. My FTP server can connect back to either of these clients. I can also see the process listening in netstat after the PORT command is sent.


Top
 Profile  
 
PostPosted: 2012-03-21 07:07 
Offline
Site Admin
User avatar

Joined: 2004-02-23 20:49
Posts: 22541
Seems weird. Can you please post a log from FileZilla?


Top
 Profile  
 
PostPosted: 2012-04-13 21:47 
Offline
500 Command not understood

Joined: 2012-03-19 19:04
Posts: 4
Sorry for the late reply. Here is my log. Filezilla sends a USR, PASS, PORT, LIST (in that order). When the PORT command is sent, my server tries to connect to it, but as I said above, the port is not open, as confirmed by netstat

2012-04-13 14:41:35 3760 3 Status: Connecting to 10.6.33.103:2121...
2012-04-13 14:41:35 3760 3 Status: Connection established, waiting for welcome message...
2012-04-13 14:41:35 3760 3 Response: 220 TransCore FTP server v1.0
2012-04-13 14:41:35 3760 3 Command: USER netuser1
2012-04-13 14:41:35 3760 3 Response: 331 Password required for netuser1.
2012-04-13 14:41:35 3760 3 Command: PASS ********
2012-04-13 14:41:35 3760 3 Response: 230 User logged in.
2012-04-13 14:41:35 3760 3 Status: Connected
2012-04-13 14:41:35 3760 3 Status: Retrieving directory listing...
2012-04-13 14:41:35 3760 3 Command: PWD
2012-04-13 14:41:38 3760 3 Response: 257 "/" is current directory.
2012-04-13 14:41:38 3760 3 Command: TYPE I
2012-04-13 14:41:38 3760 3 Response: 200 Type set to I.
2012-04-13 14:41:38 3760 3 Command: PORT 10,6,33,103,202,246
2012-04-13 14:41:38 3760 3 Response: 331
2012-04-13 14:41:38 3760 3 Command: LIST
2012-04-13 14:41:38 3760 3 Response: 200 PORT command successful.
2012-04-13 14:41:38 3760 3 Error: Failed to retrieve directory listing
2012-04-13 14:41:38 3760 3 Response: 150 Opening ASCII mode data connection.
2012-04-13 14:41:38 3760 3 Response: 226 Transfer complete.


Top
 Profile  
 
PostPosted: 2012-04-13 23:03 
Offline
500 Command not understood

Joined: 2012-03-19 19:04
Posts: 4
It looks like Filezillia sends multiple PORT commands, but doesn't really intend to listen on them. For example, during login, I'm seeing Filezilla send the USR/PASS, followed by a PORT and a LIST. Filezilla isn't listening on the port specified in PORT, so the LIST fails. When I try a transfer file, I see the same PORT/LIST behavior. Towards the end of the activity, the PORT/STOR finally succeeds as Filezilla is actually listening on the port. Ultimately, file transfer is working. I was just concerned about all the failed connections.


Top
 Profile  
 
PostPosted: 2012-04-15 12:01 
Offline
Site Admin
User avatar

Joined: 2004-02-23 20:49
Posts: 22541
Quote:
2012-04-13 14:41:38 3760 3 Command: PORT 10,6,33,103,202,246
2012-04-13 14:41:38 3760 3 Response: 331
2012-04-13 14:41:38 3760 3 Command: LIST
2012-04-13 14:41:38 3760 3 Response: 200 PORT command successful.


Either a horribly broken server or some firewall and/or NAT router is injecting additional replies into the connection.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Dedicated server provided by Artmotion.
Forum sponsored by Everyware.ch.
Powered by phpBB® Forum Software © phpBB Group