Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-14-2004, 11:37 PM
|
#1
|
|
LQ Newbie
Registered: Oct 2004
Posts: 12
Rep:
|
Too much delay in ftp/ssh to start
I have exactly same setup in two offices. From one office, if I try to do ftp (or ssh) to anywhere in the world, it takes a long time before the login prompt comes (roughly 10-15 seconds minimum). Ftp normally takes far more time though.
However, from another office, I get it almost instantaneously!
I was told by several people that it could be "Reverse DNS Mapping" which is causing this trouble. If that is really the case, then I should get the trouble in both offices since they have exactly same kind of DNS setup (of course, with the difference of their own external/internal IPs).
I also have similar type of "/etc/hosts", "/etc/resolv.conf" and "/etc/nsswitch.conf" files at both ends. I have also checked "/etc/hosts.allow" and "/etc/hosts.deny" files at both ends. They are essentially empty.
The machines where I try this, are the main masquerading machines connected directly to the internet via modem/router and firewall. There is of course, internal network at both offices which is connected via VPN (ipsec).
Could it be the case that some DNS entries at ISP of problematic office is causing some trouble here?
Thanks all for your time..
Last edited by anmsg; 10-14-2004 at 11:42 PM.
|
|
|
|
10-15-2004, 12:52 AM
|
#2
|
|
Member
Registered: Feb 2002
Location: IL
Distribution: Ubuntu currently, also Fedora, RHEL, CentOS
Posts: 111
Rep:
|
really sounds like dns. You can change your /etc/ssh/sshd_config to not do reverse dns lookup, that could save you time. Also, most ftp daemons can be changed. Sounds like dns is hosed at one end, or your NAT has no reverse record.
MIKE
|
|
|
|
10-15-2004, 03:50 AM
|
#3
|
|
LQ Newbie
Registered: Oct 2004
Posts: 12
Original Poster
Rep:
|
Could you please tell what to change in "/etc/ssh/sshd_config"? Also, I am using vsftpd on the problematic office. How do I disable reverse name lookup there?
|
|
|
|
10-15-2004, 07:46 AM
|
#4
|
|
LQ Newbie
Registered: Feb 2004
Posts: 3
Rep:
|
I think the following entry would do it (in /etc/ssh/sshd_config):
Code:
VerifyReverseMapping no
Note that you would need to make this change on the servers you are trying to reach from the affected office, not the servers located at this office.
The problem is that when you contact a host from this office, the host tries to do an inverse lookup on your public IP address. If there is no reply, pretty much everything that uses IP will be delayed. The real solution, therefore, is to contact your ISP and get a reverse DNS entry set up for that address.
Last edited by mciann; 10-15-2004 at 07:48 AM.
|
|
|
|
10-15-2004, 07:52 AM
|
#5
|
|
LQ Newbie
Registered: Oct 2004
Posts: 4
Rep:
|
could do manual entries in /etc/hosts
If your IP address for your office router is statice you could simply put an entry in the /etc/hosts file of the machines that you are trying to connect to.
|
|
|
|
10-15-2004, 10:43 AM
|
#6
|
|
LQ Newbie
Registered: Feb 2004
Posts: 3
Rep:
|
Quote:
|
If your IP address for your office router is statice you could simply put an entry in the /etc/hosts file of the machines that you are trying to connect to.
|
I haven't had success with that approach in the past. Will the machine look to /etc/hosts to do an inverse?
|
|
|
|
10-15-2004, 12:31 PM
|
#7
|
|
LQ Newbie
Registered: Oct 2004
Distribution: AS3 et al
Posts: 3
Rep:
|
/etc/hosts additions have worked for me in the past.
|
|
|
|
10-15-2004, 12:52 PM
|
#8
|
|
LQ Newbie
Registered: Aug 2004
Location: Petaluma, CA, US
Distribution: Debian GNU/Linux squeeze/sid
Posts: 28
Rep:
|
Quote:
Originally posted by mciann
I haven't had success with that approach in the past. Will the machine look to /etc/hosts to do an inverse?
|
That depends on /etc/nsswitch.conf. Look for:
hosts: files dns
And you should be OK putting the static IP in. But as the other guys pointed out, your best bet is to always disable reverse lookups in your daemons. I know proftpd has such a setting.
[added later:] The tools 'strace' and 'tcpdump' are invaluable in solving this type of problem, but it takes a while to get proficient with them.
Last edited by jcomeau_ictx; 10-15-2004 at 12:55 PM.
|
|
|
|
10-15-2004, 06:20 PM
|
#9
|
|
Member
Registered: Mar 2004
Location: Austin, TX
Distribution: CentOS Fedora RHEL SLES Knoppix
Posts: 78
Rep:
|
Quote:
Originally posted by mciann
I think the following entry would do it (in /etc/ssh/sshd_config):
Code:
VerifyReverseMapping no
|
The default value for Reverse Lookups is "no", so unless he has specifically
changed his SSH Configuration to do reverse lookups that won't be it.
/Les
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:13 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|