Troubleshooting FTP connection problems

FTP connection problems
There can be a number of reasons for not being able to connect to your FTP server. The most common problems are related to firewalls blocking the ports that are needed for FTP to work, and routers running NAT which hides your internal IP address to the outside world. Connection problems can be due to either of these 2 areas, or a combination of both. It can also occur on the server side, the client side or both.

Particullarly if you are running your own FTP server you need to make sure that it is configured to run through a firewall/router.

To understand how to troubleshoot it's good to have a little bit of knowledge of how the FTP protocol works and some inherent problems with the FTP protocol. Below are some articles that can be good to read before starting to troubleshoot:


Step by step, troubleshooting connection problems

Make sure that your server is configured correctly
If you are running your own FTP server, you need to make sure that you enable your server and firewall/router for running FTP. This involves 4 steps:

  • Set up static IP addressing for your router/firewall for computer inside your Local Area Network
  • Enable port forwarding of the ports needed for FTP. This usually means port 21 for normal FTP, port 990 for FTP over SSL/TLS, and the PASV port range used when running Passive Mode (see below for how to restrict the PASV port range).
  • Configure your FTP server so that it uses your external FTP (WAN) IP adress in the communication to the FTP client (see the server manual for how to do this). If you don't do this the FTP server will use the internal LAN IP address, which is not visible to the outside world.
  • Set up a PASV port range that your FTP server will use when using passive mode. This is to limit the number of ports that you need to forward in your firewall.

This website describes these steps in a bit more detail. For instructions on how to configure your particular firewall/router you can consult your firewall manual or go to portforward.com which has descriptions on how to configure most firewalls.

Are you running Active Mode?
Active mode does not works very well with firewalls and routers. Try checking the Passive Mode check box in the Remote Connect window to enable Passive Mode instead.

Is the connection attempt just hanging forever, or is it timing out after a while?
If the connection attempt is hanging forever (more than 2 minutes), then it could be due to some different implementations of how socket networking is done on your phone. Some phones contains bugs in the firmware which makes it not compliant to the standard way of how to implement networking in Java. We have tried to cope with these bugs by implementing 4 different connection modes, which can be changed in the "Settings" menu in MobyExplorer.

You change the connection mode in the Remote Connection window. Scroll down to the bottom of the window. Try each connection mode (starting with 0) and see if it makes your connection work. The recommended setting for Nokia phones is 1. The recommended setting for Sony Ericsson phones is 0. To run secure FTP over SSL/TLS the recommended setting is 2. However try all settings and see which one works best.

Are you able to connect but are getting intermittent errors during your session
This can be due to the same reason (bugs in the phone firmware) as described in the previous question. Please try a different Connection Mode in the way that was described in the previous question.

Are you running Passive Mode?
If you are running Passive Mode, and the above steps doesn't help, then you can try and check the "Use server name for passive mode" in the Remote Connect window. This can help if the FTP server is behind a NAT router and you are not able to configure the server so that is uses it's external IP address.

Normally Passive Mode is the most fail safe way of establishing a connection. However, if nothing else works you can try un-checking the Passive Mode tick box in the Remote Connection window and see if this helps.

Can you connect to public FTP servers?
Try to connect to a well know public anonymous FTP server. For example, try to connect to ftp.sunet.se (anonymous login, normal FTP on port 21 only). If you are able to login there the problem lies on the server side. If you are not able to login there, the problem is most likely on the client side. If you have tried all the steps above and it still doesn't work, then it is most likely that your mobile phone operator blocks the necessary ports to be able to run FTP. In this case there is not much you can do except nag your operator to open up these ports (there are no reasons to keep them blocked).

© 2007 Bermin Software