When connecting to internet address in the FTP client we get an error
Error: The data connection could not be established: ECONNREFUSED – Connection refused by server
When connecting through same client to FTP server error does not occur (When connecting through local LAN’s clients)
Window Firewall is off.
Tried with changing ports.
We have two server running fine .So network configuration is done proper.
Error log is :
Status: Connecting to 117.247.9.3:2555... Status: Connection established, waiting for welcome message... Response: 220-FileZilla Server version 0.9.40 beta Response: 220-written by Tim Kosse (Tim.Kosse@gmx.de) Response: 220 Please visit http://sourceforge.net/projects/filezilla/ Command: USER ++++ Response: 331 Password required for ++++ Command: PASS ****** Response: 230 Logged on Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" is current directory. Command: TYPE I Response: 200 Type set to I Command: PASV Response: 227 Entering Passive Mode (192,168,1,78,5,245) Status: Server sent passive reply with unroutable address. Using server address instead. Command: MLSD Error: The data connection could not be established: ECONNREFUSED - Connection refused by server Response: 425 Can't open data connection. Error: Failed to retrieve directory listing Status: Connecting to 117.247.9.3:2555... Status: Connection established, waiting for welcome message... Response: 220-FileZilla Server version 0.9.40 beta Response: 220-written by Tim Kosse (Tim.Kosse@gmx.de) Response: 220 Please visit http://sourceforge.net/projects/filezilla/ Command: USER ++++ Response: 331 Password required for ++++ Command: PASS ****** Response: 230 Logged on Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" is current directory. Command: TYPE I Response: 200 Type set to I Command: PASV Response: 227 Entering Passive Mode (192,168,1,78,5,255) Status: Server sent passive reply with unroutable address. Using server address instead. Command: MLSD Error: The data connection could not be established: ECONNREFUSED - Connection refused by server Response: 425 Can't open data connection. Error: Failed to retrieve directory listing
Best Answer
It looks like the server is inside a private network, that is behind a router/firewall. But you access the server from outside the private network. Unless the router/firewall has special helpers to deal with this situation and to rewrite the traffic this will not work with passive mode. Given the above response from the server received by the client you have no such router/firewall.
In this case you would have to need active mode. But, if both client and server are behind such a router/firewall and are in different networks even active mode will not work.