strange solution with ftplib and changed firewall rules

PiErre siggy2 at supereva.it
Fri Jan 31 03:36:59 EST 2003


Dear python-gurus,
   we had installed on several of our customers servers a python script
that  dayly downloads some files  (using ftplib - and timeoutsocket.py:
many thanks to Timothy O'Malley).
Recently a customer of ours changed his firewall and the ftp job
started to fail (connection was ok but after requesting a retrbinary
all we got was a <10054 "connection reset by peer">).
Instead if he try to get those files via normal ftp client 
(say %windir%\system32\ftp.exe), all was fine.
We discover the nasty trick after some hour: we forced the connection 
in active mode (with  our_ftp_object.set_pasv(0)) and - bang - all was ok!
The hint I discover: 
I read past post when in earlier python versions "passive mode" was NOT 
the default setting and someone solved trouble like mine using 
our_ftp_object.set_pasv(1) (funny!).

Isn't all this problem twisted? Or is my solution twisted?

Since it seems that quite all the firewalls in the world allows passive
connections if any should I warn my customer that he could have
a security problem?

TIA for your help!
bye,
   PiErre




More information about the Python-list mailing list