Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title When trying to FTP from QNX4, a "425 Can't build data connection: Connection timed out." error occur
Ref. No. QNX.000010194
Category(ies) Network
Issue The following error message occurs when doing a FTP "425 Can't build data connection: Connection timed out."x0d  The FTP sucessfully logged in, but the 'get' command fails with the above command.x0d  What are the conditions that may cause this?
Solution It actually opens a stream connection (see getdatasock() ). This errorx0d is generated by the server that is being ftped in to.x0d
x0d
When the get command is used, the server attempts to make a connection backx0d tox0d the client (unless in passive mode).  In this case, theyx0d got connection timed out. For a user to get thisx0d message on the screen means that the ftp session is still up yet thex0d server cannot reach the client for a data connection. The problem is probablyx0d that a user is going through a firewall for the ftp session.x0d
x0d
What happens is that the ftp client will issue a command (get) whichx0d includesx0d a PORT command. This PORT command tells the ftp server where to make thex0d datax0d connection to.x0d
x0d
client <---------->firewall<--------------> serverx0d
10.0.0.1        10.0.0.2  209.x.x.xx09x09  209.x.x.xx0d
x0d
The client sends the port command to the server to connect to 10.0.0.1 portx0d xx0d
x0d
The firewall is doing NAT or ipmasqurading, so the connections out arex0d remaped,x0d but the ftp data that makes up the command is not, so the server willx0d attemptx0d to connect to 10.0.0.1 for which it has no direct connection.x0d
x0d
The solution here is to run a firewall that also remaps ftp PORT commands,x0d or to use the ftp client in passive mode, which means all connectionsx0d includingx0d data ones are outgoing.