Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone,

I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the ftp connection either times out or is rejected. All IP configurations in the server are correct, as verified by our network team. All system configurations on ftp seem to be working as shown below:

------------------------------------------------
root@SOL10SER # svcs -a | grep ftp
online 2:34:37 svc:/network/ftp:default
root@SOL10SER # inetadm | grep ftp
enabled online svc:/network/ftp:default
root@SOL10SER # cat /etc/services | grep ftp
ftp-data 20/tcp
ftp 21/tcp
tftp 69/udp
root@SOL10SER # netstat -an | grep *.21
.21 *. 0 0 49152 0 LISTEN
.21 *. 0 0 49152 0 LISTEN
-------------------------------------------------

As for the network part, we have verified that the following files contain correct values:

/etc/defaulrouter
/etc/netmasks
result of ifconfig -a

Furthermore, this server is not connected to any firewall/load balancer/proxy

Can anyone tell me what's going on? Thanks everyone for your time.

Did you check whether FTP is enabled on the servers where it is timing out or getting rejected.

Thanks for your response.

Yes we did. ftp is working fine on the destination servers we tested (outbound and inbound).

What's more strange in this server having problem is that all inbound ftp connections are working fine. It is only its outbound connection that results to rejection/timing out.

In that case, in the servers not allowing ftp you can look into below two files which are used to restrict ftp access.

  • /etc/ftpd/ftpusers - the user ID you are trying to use to login must not be there in this file.

  • /etc/ftpd/ftphosts - this is used to specifically dis allow ftp access to a login ID from a particular host.

A few things to check from the basic to the more obscure.

1) Can you ftp within the server both to localhost and the server name?

ftp localhost
ftp localservername

2) Is the server name and IP address consistent?

Check on every machine:
nslookup servername1
nslookup servername2

3) Are there rogue .netrc files ?

Search each source computer for .netrc files and inspect permissions and contents.

4) FTP can be crippled by certain physical network configuration issues

No network port on the server, switch or hub should be set to auto-detect or auto-negotiate. The mess this can create is very difficult to detect but a common symptom is connections dropping to half-duplex and CRC errors.
A cold start of network components and then servers will often cure these symptoms for a while. A random order cold start (e.g. after a power failure) will often cause these symptoms. Re-patching a network connection is another way of causing these symptoms.

5) FTP does not like the "jumbo packets" setting in any network components and will often hang.