Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Network problem, help!

Status
Not open for further replies.

rumen

Instructor
Nov 24, 2001
1
BG
Hi, I have problem with my network on Slackware 7.1 that can not solve.
I have a local network which is not connected all the time to the Internet. My gateway is 3com Office connect. And so My Slackware Linux machine accepts telnet and ftp from my local network only when the gateway is connected to the Internet. I made a tcpdump and found that every time I want to make ftp or telnet to this Linux host it makes connection to the DNS specified in the resolv.conf (DNS is not in the local net), if they are not available connection hangs just before the login prompt. Here is the output:

hal$ telnet 192.168.200.253
Trying 192.168.200.253...
Connected to 192.168.200.253.
Escape character is '^]'.

and

hal$ ftp 192.168.200.253
Connected to 192.168.200.253.

First I removed All entries from resolv.conf and everything was OK(except that this Linux machine has no access to DNS). I uncommented entries in resolve.conf and decided that the problem is in the nsswich.conf. But this file looked well every where "files" was first and then "dns":

...............
hosts: files dns
networks: files dns
................

I removed dns from "hosts:" and everything was OK (except the DNS of coarse).

Can You help me please?
Where is the problem and why this Slachware 7.1 machine searches DNS on incoming connections?

Thanks a lot in advance!

Rumen
 
If you are running telnetd, then this is probably running under TCP Wrappers. From my experience, TCP Wrappers seems to do a host name lookup for every incoming connection if the "host.allow" or "hosts.deny" contains a domain name.

Take a look in /etc/hosts.allow and /etc/hosts.deny and change any domain name references to dotted IP style addresses.

As a possible workaround if you still have problems, how about having two copies of nsswitch.conf? Edit the &quot;ip-up&quot; script to copy in the &quot;on-line&quot; version of nsswitch.conf that contains DNS. Edit &quot;ip-down&quot; to copy in a nsswitch.conf that doesn't contain DNS references. [sig]<p> Andy Bold<br><a href=mailto: > </a><br><a href= > </a><br>"I've probably made most of the mistakes already, so hopefully you won't have to..." Me, most days.[/sig]
 
Hi

You could enter your local hosts into your /etc/hosts file, so the DNS resolve would stop there and would not require connectivity to a DNS server...

bye [sig][/sig]
 
I was having similar problem with my RH6.2 gateway Linux box... To solve this, I have put the IP addresses and machine names for all the local machines into my &quot;/etc/hosts&quot; file... everything is fine now...

AV [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top