[ZCM] [ZC] 368/ 2 Reject "FTP DATA Connections always open on the default IP of the host"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Mon Apr 11 13:44:27 EDT 2005


Issue #368 Update (Reject) "FTP DATA Connections always open on the default IP of the host"
 Status Rejected, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/368

==============================================================
= Reject - Entry #2 by tseaver on Apr 11, 2005 1:44 pm

 Status: Pending => Rejected

I can't reproduce this on either the head or the 2.7 branch.
In both cases, I set up an alternate interface, configured it
using zope.conf, and was able to connect to it and transfer
files in active mode (note the PORT command):

 192.168.1.200 35270 ==> 220 192.168.1.200 FTP server (Medusa Async V24763 [experimental]) ready.
 192.168.1.200 35270 <== FEAT
 192.168.1.200 35270 ==> 530 Please log in with USER and PASS
 192.168.1.200 35270 <== AUTH TLS
 192.168.1.200 35270 ==> 500 'AUTH': command not understood.
 192.168.1.200 35270 <== USER zope
 192.168.1.200 35270 ==> 331 Password required.
 192.168.1.200 35270 <== PASS <password>
 192.168.1.200 35270 ==> 230 Login successful.
 192.168.1.200 35270 <== FEAT
 192.168.1.200 35270 ==> 211-Extensions supported:
  MDTM
  SIZE
 211 END
 192.168.1.200 35270 <== PWD
 192.168.1.200 35270 ==> 257 "/" is the current directory.
 192.168.1.200 35270 <== PORT 192,168,1,200,137,199
 192.168.1.200 35270 ==> 200 PORT command successful.
 192.168.1.200 35270 <== LIST
 192.168.1.200 35270 ==> 150 Opening ASCII mode data connection for file list
 192.168.1.200 35270 ==> 226 Transfer complete
 192.168.1.200 35270 <== TYPE I
 192.168.1.200 35270 ==> 200 Type set to Binary.
 192.168.1.200 35270 <== SIZE standard_error_message
 192.168.1.200 35270 ==> 213 1227
 192.168.1.200 35270 <== MDTM standard_error_message
 192.168.1.200 35270 ==> 213 20050411172947
 192.168.1.200 35270 <== PORT 192,168,1,200,137,201
 192.168.1.200 35270 ==> 200 PORT command successful.
 192.168.1.200 35270 <== RETR standard_error_message
 192.168.1.200 35270 ==> 150 Opening Binary mode data connection for file 'standard_error_message'
 192.168.1.200 35270 ==> 226 Transfer complete
 192.168.1.200 35270 <== QUIT
 192.168.1.200 35270 ==> 221 Goodbye.

________________________________________
= Request - Entry #1 by Anonymous User on Apr 27, 2002 2:23 pm

a FTP Connection (not PASV) with e.g. Microsoft Explorer hangs if the Server doesn't run on the default IP of the host.

if zope is started with a different IP (e.g. with z2.py -P ...) than the default IP of the host (returned by gethostname()) then the Server tries to open the FTP-DATA Connection with the default IP of the host (instead of the IP the Zope-Server is running)

Maybe the problem starts at  ZServer/medusa/ftp_server.py - line 707:
self.hostname = socket.gethostname()


maybe socket.gethostbyaddr(ip)[0]
(but what if RDNS is not working)
==============================================================



More information about the Zope-Collector-Monitor mailing list