Getting "ftp error 425 failed to establish connection" when trying to connect to ftp server. Tried 2 ftp clients on 3 machines on same network and none work. However FTP works from home / mobile broadband.

  • No ip blocks on ftp sever.
  • Other ftp servers(differrent ip/hosts) work okay.
  • firewall setup correct, no ports blocked.

Is it possible to use a proxy for ftp a i think it's something with the ISP but taking too long to fix?

  • FTP and FTPS are quite different. Mostly same letters, same goal. Different architecture. It is a bit like tagging a question with [benzine/gas] and [diesel] and stating "I have a problem with my fuel". Could you narrow it down? – Hennes Sep 6 '16 at 12:26
  • Also, I read 'when trying to connect' as on the initial connection attempt (e.g. when you might issue user, pass, capabilities etc etc). Not after connecting and issuing and get/put/ls or similar command. Is that correct? – Hennes Sep 6 '16 at 12:27

on a vsftpd server within CentOS 7 there was an error 425 sometimes

ftp.exe from Windows Legacy (2000, XP, 7) support only active ftp (ports 21,20) ftp.exe from Windows 10 does work with passive mode. this vsftpd server was configured to support both active and passive modes it had both lines at /etc/vsftpd/vsftpd.conf:


but, Windows 10, and others, sometimes did login and were able to transfer, sometimes they did not, with error 425; this was not a NAT, router or firewall problem; as one can find searching the Internet, it was a security policy by SELinux.

the solution:

setsebool -P ftpd_connect_all_unreserved 1
| improve this answer | |

According to an answer on superuser, the problem is that something on the way from you to your ftp server only supports "passive" mode FTP connections. Adding -p to your ftp commandline swiches it to passive mode. Otherwise look up the relevant option in your ftp program.

| improve this answer | |

Assuming the user/password dialog is successful and you are attempting the GET command, then you get the "Failed to Establish Connection" whiney message, perhaps it is the ftp port number. Sometimes ftp passive ports are range limited, such as using ports 5000-5999. This can be done within your or their router. Either get both ftp's using the same passive port range, or include the command "PASSIVE" within your ftp command dialog.

This passive port limit might be set in /etc/vsftpd/vsftpd.conf

| improve this answer | |
  • upvoted as this seems good advice, using lsof i see a port in the range is fired up when i attempt to connect in passive mode. Still getting ftp: connect: Connection timed out, but that's probably for another question – bbarker Apr 4 '19 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.