# slow ftp server



## BobWestfield (May 23, 2002)

I'm running OS X 10.1x. I've been running an ftp server for a few months now. I've also got tcp-wrappers installed to restrict which IP addresses can access my server.

Up until last week, everything was fine. But on Friday, the ftp server became painfully slow. It takes several minutes to make the connection and get logged in to the ftp server.

The Apache web server does NOT have this problem. It's still very fast.

Does anyone have any ideas what may have happened? I want to emphasize that this has only been a problem recently. I realize using tcpwrappers and a hosts.allow file can slow down the auth process. But as I've already said, it was very responsive until about a week ago.

I'm hoping someone out there knows more about this subject than me and will be willing to lend a hand.


-Bob


----------



## blb (May 23, 2002)

Is it just the initial connection which is slow, or the transfer of files?

If it's the initial connection, I'd first say your server is experiencing an inability to resolve the client's IP address back to a host name.  In other words, client 1.2.3.4 connects to the server, which tries to resolve 1.2.3.4 to a hostname, and times out waiting for it.  To test this, run

```
nslookup 1.2.3.4
```
on the ftp server (obviously replacing 1.2.3.4 with the client's real IP address), and see if it gives a hostname.  If not, that's probably it.


----------



## BobWestfield (May 24, 2002)

Thanks for your response. It seems you were correct. The problem was with my dns server, not the OS X ftp server.

Once we rebooted the dns server (A Sun box), everything worked fine.

Thanks again.

-Bob


----------



## mrajamani (Oct 24, 2008)

I am looking to connect via ftp from within a vlan with IP address say 192.168.1.2 to my mac ftp server which is point to a DNS server of 202.1.1.1. 

Since I don't have my own DNS server, I cannot add the local 192.x.x.x IP addresses to a DNS server. Instead, I added them to the /etc/hosts file of the Mac machine rnning the FTP server. 

When I do an nslookup, it is still resolving it using 202.1.1.1 instead of looking into hosts file first.

What do I do?


----------



## mrajamani (Oct 25, 2008)

I found the answer to my question. On the mac I need to use niload command to make my mac recognize the /etc/hosts entries.

$sudo niload -v -m hosts . < /etc/hosts

Now, I do not see any lag on connecting to the Mac FTP server!!


----------



## mrajamani (Oct 30, 2008)

I'll take that back.  My slow connection issue is still not resolved.

I do have to highlight here that despite doing the "niload" when I do an nslookup using the FTP client IP, the mac server is not resolving it. 

PLEASE HELP!!


----------

