I'm using lftp to connect to a pureftpd server using TLS.

I'm behind a firewall so I've used these settings and forwarded a port on my
router (4000) to my internal pc ip. I wish to download multiple files using
only this port.

set ftp:ssl-force yes
set ftp:passive-mode no
set ftp:port-ipv4 MYEXTERNALIP
set ftp:port-range 4000-4000
set net:max-retries 1
set ftp:ssl-protect-data yes

However after downloading one file successfully I have to wait 1 minute to
download another successfully otherwise I get these errors.

<--- 425 Could not open data connection to port 4000: Cannot assign
requested address

This plays havoc with attempting to mirror a directory. Can anyone help a
newbie with this? I don't wish to wait a minute to download each file! Can I
do this with only one port 4000 open?

BTW I've manually compiled lftp v3.5.6 on debian sarge using libraries
GnuTLS 1.0.16, zlib 1.2.2

Kind regards,
Rick

P.S. Here's my transfer log with debug if this helps:

---- Connecting to XXX (XXX) port 21
<--- 220---------- Welcome to Pure-FTPd [TLS] ----------
<--- 220-You are user number 2 of 50 allowed.
<--- 220-Local time is now 13:42. Server port: 21.
<--- 220-This is a private system - No anonymous login
<--- 220 You will be disconnected after 15 minutes of inactivity.
---> FEAT
<--- 211-Extensions supported:
<---  EPRT
<---  IDLE
<---  MDTM
<---  SIZE
<---  REST STREAM
<---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
<---  MLSD
<---  ESTP
<---  PASV
<---  EPSV
<---  SPSV
<---  ESTA
<---  AUTH TLS
<---  PBSZ
<---  PROT
<--- 211 End.
---> AUTH TLS
<--- 234 AUTH TLS OK.
---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
Certificate: XXX
<--- 530 You aren't logged in
---> USER XXX
<--- 331 XXX. Password required
---> PASS XXXX
<--- 230-User XXX has group access to:  XXX
<--- 230 OK. Current restricted directory is /
---> PWD
<--- 257 "/" is your current location
---> PBSZ 0
<--- 200 PBSZ=0
---> PROT P
<--- 534 Fallback to [C]
---> PROT P
<--- 534 Fallback to [C]
---> TYPE I
<--- 200 TYPE is now 8-bit binary
---> SIZE file1
<--- 213 10
---> MDTM file1
<--- 213 20061107151751
---> PORT MYEXTERNALIP,15,160
<--- 200 PORT command successful
---> RETR file1
<--- 150 Connecting to port 4000
---- Got EOF on data connection
---- Closing data socket
<--- 226-File successfully transferred
<--- 226 0.000 seconds (measured here), 43.02 Kbytes per second
10 bytes transferred in 4 seconds (3b/s)

lftp [EMAIL PROTECTED]:/> get file2 -o /tmp/
---> SIZE file2
<--- 213 4093
---> MDTM file2
<--- 213 20061107181714
---> PORT MYEXTERNALIP,15,160
<--- 200 PORT command successful
---> RETR file2
<--- 425 Could not open data connection to port 4000: Cannot assign
requested address
---- Closing data socket
---> PORT MYEXTERNALIP,15,160
<--- 200 PORT command successful
---> RETR file2
<--- 425 Could not open data connection to port 4000: Cannot assign
requested address


Reply via email to