FTP error 425, "Can't open data connection."

One of the most common questions I get about FTP has to do with error 425, "Can't open data connection."  This is indeed a protocol level error that is defined in the RFC.  Its meaning is obvious:  the data connection (for a directory listing, upload, or download) was unable to be established. 

First - the most common solution:  change the active/passive mode settings.  But that might not work, and if it does its only a band-aid covering up the real problem.

As I've mentioned in the past, one of the most common reasons that this error occurs is a misconfiguration of the FTP server software itself, related to SSL connections and firewalls, in which the connection tries to establish itself on a bogus ip address.  Read more about FTP SSL through a NAT firewall here, some potential solutions are included.

There are other less likely causes, such as:

  • The server is configured to always use the same port for passive mode connections, or the client is configured to always use the same port for active mode connections, although in this case usually the software in question should raise a different error first, but I've seen this happen.
  • In passive mode, the firewall in front of the FTP server doesn't have the correct ports open.  So the server tells the client to connect to ipaddress 1.2.3.4 on port x, but the firewall doesn't allow incoming connections on port x.  Most firewalls are smart enough to open up the port when it sees the PASV response.  Vice versa for active mode and the firewall in front of the FTP client.
Technorati Tags:

Print | posted on Thursday, January 24, 2008 4:11 PM

Feedback

# re: FTP error 425, "Can't open data connection."

Left by brian at 2/11/2008 10:12 PM
Gravatar iam using isa server 2000 connecting to a site but when i try to access the folders through an active connection i get 425 can't open data connection. ive opned ports 1024 to 5000 port 20 nothing is helping can you help please

# re: FTP error 425, "Can't open data connection."

Left by Name at 4/24/2008 9:58 AM
Gravatar Thx, switched to active mode fixed my issue.

# re: FTP error 425, "Can't open data connection."

Left by Iain Watt at 6/1/2008 1:31 PM
Gravatar Nice and easy to understand. But I'm getting a 425 error, but it is "error 425 sorry, invalid address given" Have you any explanation for this error message and why is it the same error number?

# re: FTP error 425, "Can't open data connection."

Left by Francis at 7/29/2008 5:58 PM
Gravatar I'll try that and comment back :D

# re: FTP error 425, "Can't open data connection."

Left by Brian at 8/26/2008 1:55 PM
Gravatar Hi...
I have FTPServer1 running behind a router and FTPServer2 running behind another router on a different internet connection.

One of my customers can connect to FTPServer1, but not FTPServer2 (they use WS_Ftp Pro). I don't think the problem is on the client end since they can connect to one, but not the other.

I have about 25 other customers that can connect to FTPServer2 just fine, but this one customer can not connect. The Error 425 Can't Open Data Connection error comes up on FTPServer2 when they try to connect. Any idea what else I can check? I've tried changing passive/active.

# re: FTP error 425, "Can't open data connection."

Left by Raj at 9/24/2008 2:43 AM
Gravatar thx.. its working fine in active mode

# re: FTP error 425, "Can't open data connection."

Left by Terri at 10/11/2008 11:40 PM
Gravatar I am trying to install a printer I bought without CD. When I try to download drivers from HP it gives me the error "425 can't open data connection". I have tried and tried with no luck.

# re: FTP error 425, "Can't open data connection."

Left by Jean-PIerre Carrier at 12/3/2008 3:25 PM
Gravatar Try to disable the server fire wall where the ftp is install

# re: FTP error 425, "Can't open data connection."

Left by saravanan at 12/5/2008 11:05 AM
Gravatar Please help me

# re: FTP error 425, "Can't open data connection."

Left by Caroline Hulse at 12/14/2008 9:40 AM
Gravatar I have tried EVERYTHING. Taken off Norton - put on MAcFee - tried everything above - nothing works. I still can´t connect ftp and still get the 425. The comman prompt window immediately rejects me - not even asking for my username.

Have contacted the hosts (Fasthosts) who say there is nothing they can do. This renders my web sites useless and business is suffering.I can get into all the other web sites I have hosted by other providers but not the Fasthosts ones. I am at my wits end and have spent three days trying to resolve this.

# re: FTP error 425, "Can't open data connection."

Left by Lance at 12/15/2008 10:11 AM
Gravatar Get a network sniff of the problem and that will probably reveal the cause of the problem. When you get the sniff, you can manually telnet to the ip/port the server is telling you to connect to, that will tell you if it is a pasv reply problem or a firewall problem. If you want more specific help, email me.

# re: FTP error 425, "Can't open data connection."

Left by Rathore at 1/6/2009 7:54 AM
Gravatar i'm using server window 2oo3 with ISA server 2004 standard edition.
i cant open FTP site it give error "425"
plz i'm in trouble plz help me to solve my problem

# re: FTP error 425, "Can't open data connection."

Left by rhesa at 2/13/2009 7:13 AM
Gravatar maybe you can starting service

# /etc/init.d/proftpd start
# /etc/init.d/vsftpd start

use
# ps aux | grep ftp

and try for restart your service
thank you.

# re: FTP error 425, "Can't open data connection."

Left by Fachim Harharah at 2/24/2009 4:30 AM
Gravatar hi you are true, set the passive first then send command for data connection

in Java, after login

put

FTPClient.enterLocalPassiveMode();

then

FTPClient.listFiles();


regards,

fachim

# re: FTP error 425, "Can't open data connection."

Left by Fachim Harharah at 2/24/2009 4:30 AM
Gravatar hi you are true, set the passive first then send command for data connection

in Java, after login

put

FTPClient.enterLocalPassiveMode();

then

FTPClient.listFiles();


regards,

fachim

# re: FTP error 425, "Can't open data connection."

Left by Fachim Harharah at 2/24/2009 4:30 AM
Gravatar hi you are true, set the passive first then send command for data connection

in Java, after login

put

FTPClient.enterLocalPassiveMode();

then

FTPClient.listFiles();


regards,

fachim

# re: FTP error 425, "Can't open data connection."

Left by Fachim Harharah at 2/24/2009 4:30 AM
Gravatar hi you are true, set the passive first then send command for data connection

in Java, after login

put

FTPClient.enterLocalPassiveMode();

then

FTPClient.listFiles();


regards,

fachim

# re: FTP error 425, "Can't open data connection."

Left by Fachim at 2/24/2009 4:32 AM
Gravatar hi you are true, set the passive first then send command for data connection

in Java, after login

put

FTPClient.enterLocalPassiveMode();

then

FTPClient.listFiles();


regards,

fachim

# re: FTP error 425, "Can't open data connection."

Left by Fachim at 2/24/2009 4:32 AM
Gravatar hi you are true, set the passive first then send command for data connection

in Java, after login

put

FTPClient.enterLocalPassiveMode();

then

FTPClient.listFiles();


regards,

fachim

# re: FTP error 425, "Can't open data connection."

Left by shuaib at 3/3/2009 4:50 AM
Gravatar Dears:I have a problem in my ISP that the users
are getting 425 error and I have opened port
20 and 21 but still the same problem.Please advice ,can it be a problem in my router acl?

# re: FTP error 425, "Can't open data connection."

Left by Ofer at 3/17/2009 10:50 PM
Gravatar great. active mode worked for me ...

Thanks !!

# re: FTP error 425, "Can't open data connection."

Left by Vinod Singh at 5/26/2009 12:48 AM
Gravatar I am also getting same error while using Apache FTPserver and customized ftplet. I tried to configure active mode and passive mode but of no use, am i missing something.

Thanks a lot in advance.

# re: FTP error 425, "Can't open data connection."

Left by David at 5/27/2009 3:34 PM
Gravatar What fixed this for me is if you have a SPI Firewall function on your router disable it.

# re: FTP error 425, "Can't open data connection."

Left by Welly at 5/30/2009 7:34 AM
Gravatar Hi,
This caused me quite a bit of hassle. In my case the fix was to turn off the FTP virus scanner on my Endian firewall, then everything suddenly worked. Arggh!!!
Hope this helps someone with their own (proper) firewall.

# re: FTP error 425, "Can't open data connection."

Left by Eric at 7/8/2009 2:41 PM
Gravatar Ok, David thanks for the awesome answer. I was rackin my brain and it was that damn SPI setting on router.

# re: FTP error 425, "Can't open data connection."

Left by Ambika at 8/13/2009 5:40 PM
Gravatar I am also getting the same error while transfering the file.
If i am trying to FTP the file from server1 it is working but from server2 it is giving 425 error. I tried and tried but with no luck.
here is are the set of commands and output
ftp> quote site LRECL=175
200-BLOCKSIZE must be a multiple of LRECL for RECFM FB
200-BLOCKSIZE being set to 6125
200 SITE command was accepted
ftp> quote site recfm=FB
200 SITE command was accepted
ftp> put \\server2\Data\PMRRFunded_20090813.txt 'PMIT.CW.MTGSALES'
200 Port request OK.
425 Can't open data connection

Please help me.

# re: FTP error 425, "Can't open data connection."

Left by Barbara at 8/15/2009 12:31 AM
Gravatar Hi everyone. How do I switch to active mode? I am using WinFTP Server. I saw that some of you got it fixed by changing the mode to Active from Passive. So how do I do that?

# re: FTP error 425, "Can't open data connection."

Left by Answerer at 8/23/2009 3:35 AM
Gravatar http://answers.yahoo.com/question/index?qid=20090115031718AAMJlhO

After connecting to FTP server, enter PASV at the ftp prompt

# re: FTP error 425, "Can't open data connection."

Left by hilmy at 9/6/2009 4:05 PM
Gravatar problem was in my Access-List i enable the ftp servet ro connect liside network

# re: FTP error 425, "Can't open data connection."

Left by swaroop at 10/20/2009 10:27 PM
Gravatar HI All
i wrote a sample C++ program to connect to ftp and download file/s
i am abel to conect to the ftp with the login info, even abel to enter to the specified path when send "retr filename" its throwing FTP error 425, "Can't open data connection."

I tried with all Passive, active type set to I/A but still no luck
Can any one please give me some hint or any samples

Thanks
Swaroop

# re: FTP error 425, "Can't open data connection."

Left by lilbug at 11/22/2009 12:26 PM
Gravatar I just took over updating a wed site. I was originally able to get to the ftp, but all of the sudden I can't. I get an error saying that it can't connect. Please help me. I'm pretty new at this, so I need an explaination as if it were being told to a 5-yr-old. Thanks :)

# re: FTP error 425, "Can't open data connection."

Left by dries hoebeke at 11/25/2009 10:35 PM
Gravatar hi, i had this problem in delphi (using idFtp) i had it working in a regular gui app but i gave this error after porting it to a windows service. i was able to fix this by putting the mode to passive. thanks for the tips!

# re: FTP error 425, "Can't open data connection."

Left by Paradorn at 3/17/2010 6:29 AM
Gravatar Please check your windows firewall. I disabled my windows firewall. It worked for me.

# re: FTP error 425, "Can't open data connection."

Left by Cliff Cummings at 5/15/2010 9:05 AM
Gravatar I have several FTP Accounts so you can count out the server being at fault as every one of my connections gave me the error 425, so this points to my computer or hardware. OK first off I checked the firewall etc and there has been nothing in there that seems unusual, so I looked at the router settings and port forwarding, again nothing unusual there so was at a loss... BUT

Being an ICT Engineer know that software and results can be decieving, and so I rebooted the router and hey presto!!!!!!!!! All my FTP Accounts now work. So guys if you are using a router with port forwarding or the like, I suggest you reboot it.

Hope this helps because I know how much it is frustrating to you all.

# re: FTP error 425, "Can't open data connection."

Left by Francesco at 8/31/2010 7:07 AM
Gravatar Try stopping VPN services, es "Cisco VPN Inc." if any is installed. It worked for me. Bye.

# re: FTP error 425, "Can't open data connection."

Left by Jade Hogg at 10/6/2010 7:27 AM
Gravatar Good day Gents, I had the same Issue but discovered my problem to be with my tinkering on the Firewall, enabled public to trust zone comms, but my ftp server (trust) to public was denied

I got comms back on my server and everythig worked fine again. what I think is a great Idea is to disable ports 20, 21 and enable port 990, create a Certificate and have your clients connect via ACTIVE FTP, it works perfectly and is a lot more secure

thanks for the post

# Mr

Left by Well Pump at 12/27/2010 2:03 AM
Gravatar Man you happen to be really an expert in terms of this. Many thanks for helping folks like us.

# re: FTP error 425, "Can't open data connection."

Left by Leo at 1/19/2011 3:23 AM
Gravatar As soon as I have opened ports 1024-5000 for the server in question in addition to ports 22-23 (I needed 2nd FTP server on the same network), just like "brian" mentioned above at 2/11/2008 10:12 PM, everything worked very smooth since. The FileZilla Server in my case is set to port 22, just as FileZilla client.

Btw, on port 21 everything worked perfectly without opening additional 1024-5000 ports (so strange), but like I have mentioned, I needed it to operate on port 22 due to it being a second FTP server on the same network.

# re: FTP error 425, "Can't open data connection."

Left by vishal patwardhan at 2/22/2011 2:37 AM
Gravatar Hi Guys I also face this problem alot time has given my solution which is working one find this here http://www.vishalpatwardhan.com

# re: FTP error 425, "Can't open data connection."

Left by Ron at 8/14/2011 11:52 AM
Gravatar Have a peculiar problem. Recently replaced a Win2003sp2 server with Win 2008R2 server. The firewall doe not permit passive connections. Client used wsftp or filezilla to ftp files. If client connects using active mode it goes thru in 2003 and 2008R2 server. If client uses passive mode in wsftp it initially fails and automatically switches to active mode and ftp is successfull in win 2003. But with win 2008R2 after passive fails the client switches to active mode but gets error 425.

# re: FTP error 425, "Can't open data connection."

Left by RA at 9/11/2011 5:49 AM
Gravatar Thanks ...

# re: FTP error 425, "Can't open data connection."

Left by Sapheon at 10/17/2011 4:11 AM
Gravatar Kay guys this is the solution if you are running Windows Server 2008:
Open up Windows firewall with advanced security by go to "Start - Administrative Tools - Windows Firewall" Now click "Windows Firewall Properties"

Domain Profile:
Firewall State: ON
Inboud: BLOCK [DEFAULT]
Outbound ALLOW [DEFAULT]

Private Profile:
Firewall State: OFF

Public Profile:
Firewall State: ON
Inbound: BLOCK [DEFAULT]
Outbound: ALLOWS [DEFAULT]

Now create inbound+outbound rules for port 21 and you're done

# re: FTP error 425, "Can't open data connection."

Left by divya at 10/31/2011 3:24 AM
Gravatar Hi, I have to transfer files from Win 2008R2 server to unix server through batch script. But while trying to run the script, it is getting struck up and showing the FTP error 425, "Can't open data connection.Interrupted System call" after some time. Can anyone help me to resolve this issue.

Thanks,
Divya

# re: FTP error 425, "Can't open data connection."

Left by Support at 11/17/2011 12:08 AM
Gravatar Hi, I'm using Second Copy as my thrid party to auto back up my database. The back up is successfully executed but when i pushed to FTP it shows "Can't open data connection" . Can anyone please help me.

# re: FTP error 425, "Can't open data connection."

Left by VadVoci at 12/4/2011 2:56 PM
Gravatar Connection to ftp server behind router via usb 3g modem

When i try to use Filezilla FTP Client or Cute FTP , every time i get an error :

" 425 can't open data connection " .

The Filezilla Ftp Server is behind router and 21, 20 ports is forwarded.

The Ports starting from 6000 up to 6100 are listed in special applications.

Filezilla Ftp Server is in passive mode .

I connect to my ftp server from a laptop through a USB 3G modem.

So I'm behind a Nat

Well .. That's is the only way I can connect to server....

Look at this videos:

http://www.youtube.com/watch?v=DLG2YDnmH1c

http://www.youtube.com/watch?v=3QqtLegOX3U

# re: FTP error 425, "Can't open data connection."

Left by Mart at 12/8/2011 12:07 PM
Gravatar Hello all

i have following situation:
I get file names from an XML (about 2000) now i want to load those files while looping over the list of file names and laod those files.
Therefore is see two options:
1. open one connection and reuse it for each file
2. open a new connection for each file

1. only returns me the first file, but when i try to reuse the FTPClient, i get the "425 Can't open data connection" Error.

2. this seems to work when i do it from my laptop, but not when running the calling application from the server (what is currently the same machine as the FTP server is running on, but that will change, therefore the FTP server) after quite a lot of files, the connection is not possible anymore (even though i close each connection again)

Could you please tell me, how to do that?
With active and passive mode i tried something, but i am not sure how i had to use that.


Thank you very much in advance!

# re: FTP error 425, "Can't open data connection."

Left by Rob Greenfield at 1/6/2012 1:31 PM
Gravatar Don't do the stupid thing I did to test my FTP server after making router changes. I accessed my FTP server using the external DMZ address from inside my network. The server saw the same source and destination address and got pretty confused. When I saw the error, I RDP'ed to another machine off my network and FTP worked fine.

# re: FTP error 425, "Can't open data connection."

Left by Bruce Roth at 1/11/2012 4:08 PM
Gravatar This could be an AVAST problem on the client side.

Application rules, file transfer program, change to ask, then allow when connecting.

# re: FTP error 425, "Can't open data connection."

Left by Sanjeev at 2/7/2012 2:52 AM
Gravatar I am trying FTP upload on GPRS. The upload is successful with three network operators viz. Airtel, Idea and Tata Docomo. But with the same code and same settings, I am getting FTP error 425 with Vodafone and Reliance.

I shall very much appreciate some help. Thanks.

# re: FTP error 425, "Can't open data connection."

Left by Kitchen Appliances at 4/12/2012 11:59 AM
Gravatar Excellent post. I really enjoy to read, it such a useful information. Thanks for sharing.

# re: FTP error 425, "Can't open data connection."

Left by mukesh at 4/14/2012 5:40 AM
Gravatar Command: LIST
Response: 425 Can't open data connection.
Error: Failed to retrieve directory listing

firewall blocking :(

# re: FTP error 425, "Can't open data connection."

Left by Reza Safe at 5/2/2012 5:48 AM
Gravatar hi
read full solution here:
http://rezasafe.com/blog/44/

enjoy!

# re: FTP error 425, "Can't open data connection."

Left by Waqas Ashraf at 6/12/2012 7:01 AM
Gravatar STOP CISCO VPN Services. It worked for me. Thanks to Francesco.

# re: FTP error 425, "Can't open data connection."

Left by Property Master at 12/2/2012 3:03 PM
Gravatar Switched on and off router and it worked.

# re: FTP error 425, "Can't open data connection."

Left by christine sigalla at 7/7/2014 12:38 PM
Gravatar i am trying to upload a file from my c drive to mainframe using ISPF editior but i am getting error message 425 can't open data connection but 200 port request is okay.How can i fix that?

# re: FTP error 425, "Can't open data connection."

Left by ntswaki theletsane at 8/27/2014 8:13 AM
Gravatar I need to open data connection

Your comment:





 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski