General discussion

  • Creator
    Topic
  • #2080624

    Ho to disable DNS lookups for ftpd?

    Locked

    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

All Comments

  • Author
    Replies
    • #3894850

      Ho to disable DNS lookups for ftpd?

      by mckaytech ·

      In reply to Ho to disable DNS lookups for ftpd?

      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

      • #3778690

        Ho to disable DNS lookups for ftpd?

        by d_frost ·

        In reply to Ho to disable DNS lookups for ftpd?

        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.

    • #3894559

      Ho to disable DNS lookups for ftpd?

      by hta ·

      In reply to Ho to disable DNS lookups for ftpd?

      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.

      • #3778691

        Ho to disable DNS lookups for ftpd?

        by d_frost ·

        In reply to Ho to disable DNS lookups for ftpd?

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

    • #3776279

      Ho to disable DNS lookups for ftpd?

      by kostya_belous ·

      In reply to Ho to disable DNS lookups for ftpd?

      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

      • #3778692

        Ho to disable DNS lookups for ftpd?

        by d_frost ·

        In reply to Ho to disable DNS lookups for ftpd?

        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.

Viewing 2 reply threads