From: <CH...@ch...> - 2006-01-23 18:54:52
|
if you are using vanilla command-line ftp client on windows, passive is not available. chris Dave Stern <da...@um...> Sent by: pro...@li... 01/23/2006 01:46 PM Please respond to pro...@li... To pro...@li... cc Subject Re: [Proftpd-user] passive On Mon, 23 Jan 2006, Thomas Shinnick wrote: > If you are using a command line client you may be able to see messages > that show what mode, active or passive, is being used. For instance, > using the Linux FTP client I see the message: > > ftp> dir > 227 Entering Passive Mode (192,168,233,51,149,147). > 150 Opening ASCII mode data connection for file list > : : : : : : : > > If I tell the client not to use passive mode (the default for Linux FTP > clients these days), then I see: > > ftp> passive > Passive mode off. > ftp> dir f* > 200 PORT command successful > 150 Opening ASCII mode data connection for file list > : : : : : : : > > Notice that now that we're using active mode we see that the PORT command > was sent prior to the data transfer. > > Similarly, in the ProFTPd logs we can see evidence of which mode is being > used. Given the above order of commands, we see: > > 192.168.233.51 ftp UNKNOWN ftp [23/Jan/2006:12:02:04 -0600] "USER tls" 331 - > 192.168.233.51 ftp UNKNOWN tls [23/Jan/2006:12:02:05 -0600] "PASS > (hidden)" 230 - > 192.168.233.51 ftp UNKNOWN tls [23/Jan/2006:12:02:05 -0600] "SYST" 215 - > 192.168.233.51 ftp UNKNOWN tls [23/Jan/2006:12:02:07 -0600] "PASV" 227 - > 192.168.233.51 ftp UNKNOWN tls [23/Jan/2006:12:02:07 -0600] "LIST" 226 7262 > 192.168.233.51 ftp UNKNOWN tls [23/Jan/2006:12:04:09 -0600] "PORT > 192,168,233,51,149,171" 200 - > 192.168.233.51 ftp UNKNOWN tls [23/Jan/2006:12:04:09 -0600] "LIST f*" 226 81 > > We can see the PASV command for the first transfer, and then the PORT > command for the second transfer that used active mode. > > So look in these places first, before you haul out network monitors? > > Oh, and the actual port numbers used are found in the > Entering Passive Mode (192,168,233,51,149,147). > message or the PORT command log message, > "PORT 192,168,233,51,149,171" > You can see that the IP address is the first 4 'bytes'. The last two are > the port number, though you'll have to put the 2 numbers together to > 'read' the port number, e.g. from first xfer 149*256 + 147 = 38291 . > See if these make sense to you and agree with your config. > > Thanks for your reply. The reason I posted to the list is that when I ran "dir" I did not see passive and in fact the passive command doesn't even appear to be available to me. I'm wondering if there is some specific config switch that needs to be used when built (I'm grasping at straws here) ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for file list. 226 Transfer complete. and the logfile shows myhost.umiacs.umd.edu UNKNOWN test [23/Jan/2006:13:41:42 -0500] "PORT 192,168,120,201,146,192" 200 - This is version 1.2.4 on RedHat-7.3. Same results on solaris and RedHat-E3-AS =-=-=-=-=-=-=-=-=-=- generated by /dev/dave -=-=-=-=-=-=-=-=-=-=-=-= David Stern University of Maryland Institute for Advanced Computer Studies ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ ProFTPD Users List <pro...@pr...> Unsubscribe problems? http://www.proftpd.org/list-unsub.html |