LFTP stuck making Data Connection

This topic is to discuss the following lesson:

https://networklessons.com/uncategorized/lftp-stuck-making-data-connection/

Awesome… thanks… been driving nuts for a while now.

Thanks!

This was incredibly useful - thank you! I’ve had this issue numerous times before and usually just used ncftp instead but I couldn’t do that today, so THANK YOU for solving this long-standing issue of mine! :slight_smile:

You are welcome, I also took the easy way out normally but this time I needed LFTP for some backup script so it had to be fixed.

Thanks! You nailed it. All the LFTP scripting I had done in the past used SFTP servers so I was stumped when I got to this latest standard FTP server that didn’t allow SSL.

Great, really useful!

Thanks! You are the men! :wink:

Thanks dude, you saved me the day

I had a bash script tied to scrot to upload screenshots to my website and I had this exact problem a while back. I had thought something was wrong with my host. Thanks for this; my script now works correctly! I wonder what led the lftp guys to setting SSL support on by default. It’s usually a good idea, but how many hosts out there actually support SFTP?

Hi Daniel,

I had the same problem back then. Security-wise is a good idea to use SFTP by default but the error message could be a bit less cryptic :slight_smile:

Rene

THANK YOU. Saved my pasty white butt on this one.

I was also having this problem and disabling SSL didn’t work. I found the problem was because of CSF (the firewall). I had to disable passive mode, set the port range, and add the port range to csf.conf.

I added the following to /etc/lftp.conf:

set ftp:passive-mode off
set ftp:port-range 64200-64300

And I added 64200:64300 to the TCP_IN line in /etc/csf/csf.conf. So it should look something like this:

TCP_IN = “20,21,22,25,53,80,110,143,443,465,587,993,995,3306,64200:64300”

You will also need restart CSF (using ‘csf -r’)

Thanks for sharing Nick, this is probably useful for others since CSF is used pretty often.

Good morning!

Actually lftp issue AUTH TLS when this command is advertised by the FTP server.

  1. AUTH TLS is falsly advertised (very rare)
  2. the FTP server’s encryption setup has an error (I do have a case like this)
    My vps has a working proftpd TLS setup.