General discussion

Locked

Ho to disable DNS lookups for ftpd?

By D_Frost ·
I've been having problems with slow FTP logins - delays of 45 sec. up to 2 minutes, and finally determined that underneath, DNS failures are the culprit. By changing my DNS server to a more reliable one, I've eliminated the slow logins for internal users. However, my machine has a ftp connections forwarded to it, and external clients still experience the long delay.

"strace" reveals that once again, DNS is the culprit. The FTPD or some component is trying to resolve the IP address of the client to a name, and failing. If I remove* all DNS servers from the RH Linux 6.2 machine, the delay goes away - but this will certainly cause problems down the road.

What I'd like to do is to get the FPD to not attempt the DNS lookup, so that external FTP clients don't experience the delay. I'm fine with having my logs populated with IP addresses instead of hostnames.

Anyone know how to do that? I'm very new to Linux/UNIX (Don't let strace fool you - that tip came from a friend) so detailsare a plus. Alternat

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Ho to disable DNS lookups for ftpd?

by McKayTech In reply to Ho to disable DNS lookups ...

I've been watching my FTP server since I read your question and I believe the DNS lookup is related to the password checking for anonymous FTP users. If you're using wu_ftpd like I am, if you look at the last line of the /etc/ftpaccess file, you'llsee a line that looks something like "passwd-check RFC1822 warn".

You could probably disable that line by commenting it out but this gets into one of those convenience versus security debates.

I'll keep looking for a better answer and if you want to carry on this discussion on the forum, I'll be glad to share what I find out (it's an issue for me as well).

regards!

paul

Paul M. Wright, Jr.
McKay Technologies

Collapse -

Ho to disable DNS lookups for ftpd?

by D_Frost In reply to Ho to disable DNS lookups ...

I'm not sure that this line has anything to do with DNS.... I think that it about what it implies - password checking for anonymous users.

Collapse -

Ho to disable DNS lookups for ftpd?

by hta In reply to Ho to disable DNS lookups ...

Most of the time you will not need to enable DNS for normal operation and you can disable it by running "netconf" and uncheck "DNS for normal operation". This does not mean that the system will disable DNS lookup.
I think this will solve your problem.

I home this help.

Collapse -

Ho to disable DNS lookups for ftpd?

by D_Frost In reply to Ho to disable DNS lookups ...

I had this disabled at one point and it doesn't prevent wu-ftpd from attempting the lookups.

Collapse -

Ho to disable DNS lookups for ftpd?

by Kostya_Belous In reply to Ho to disable DNS lookups ...

You can recompile wu-ftpd (http://www.wu-ftpd.org/) with option --disable-dns (Skip all DNS lookups)
for if type:
./configure --disable-dns
make
make install

Collapse -

Ho to disable DNS lookups for ftpd?

by D_Frost In reply to Ho to disable DNS lookups ...

I admit I haven't treid this yet, but I'll give you the benefit of the doubt. The machine this is running on has no other current purpose, so I removed* my nameservers altogether from the resolv.conf file for now. At some point, I'll need to run other things on that machine, and I will attempt this. Unfortunately, I need to keep that machine working and I'm afraid to tackle recompiling the ftpd right now for fear I'll break something I can't quickly fix.

Back to Linux Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums