[H-GEN] Unable to telnet
Bruce Campbell
bc at thehub.com.au
Mon Nov 8 23:34:37 EST 1999
[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]
On Mon, 8 Nov 1999, Mike Andrew wrote:
> ----- Original Message -----
> From: Craig Eldershaw <ce at comlab.ox.ac.uk>
> > It sounds like it is trying to resolve the host you are coming from by
> > querying the DNS. Since you are off line, then you have to wait until
> > all attempts to contact all your nameservers time out. Is your /ete/hosts
> file
> > set up properly (ie. including 127.0.0.1 localhost) ?
>
> I'm having the same problem and have just 'lived with it'
>
> here's my /etc/hosts
>
> 127.0.0.1 localhost localhost.localdomain
> 192.168.1.1 nfserver.nf nfserver
>
> our dialins get connected in the range 192.168.1.200+ and telnet can take
> ages if we have not dialled out
Change your /etc/resolv.conf to read:
search home.domain isp.domain
nameserver 127.0.0.1
nameserver ip.of.your.isp
Read the man pages on how to set up named, and add the following to
/etc/namedb/named.conf (or where-ever)
(you will also need the usual options, especially your ISP's
nameservers)
zone "1.168.192.in-addr.arpa" {
type slave;
file "slave/1.168.192.in-addr.arpa";
masters {
ip.address.of.isp;
names.servers.2ormore.good;
};
};
zone "isp.domain" {
type slave;
file "slave/isp.domain";
masters {
ip.address.of.isp;
names.servers.2ormore.good;
};
};
The following needs to be in /etc/host.conf
order hosts,bind
multi on
(this is from memory, check the man page)
Obviously do change the examples above to fit your situation.
Now, whats going to happen? When a request comes in, your /etc/host.conf
file says to check /etc/hosts first, then bind (named). Normally in
/etc/hosts you have localhost, and your own machine if it has a permanent
IP of its own (on your home network)
Next, the query will be directed to /etc/resolv.conf, which will make
attempts for 'host.you.just.queried.home.domain.' and
'host.you.just.queried.isp.domain.' of your name server. Since you are (I
assume) being primary for 'home.domain.' and secondarying 'isp.domain',
thats handled a good chunk of your day-to-day nameserver queries. The
same applies for resolving IP addresses by secondarying the ISP's dialup
domains (and again, I assume being master for your own network)
That will cut the time required to answer a query down remarkably. You
will get the odd query which will appear to 'hang', but I leave it to you
to read the named man page to work out how to get around that.
FYI, the timeout is normally 75seconds, and is set in your resolver
library (libc under linux?). You could always recompile your libraries
;)
--==--
Bruce.
--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.
More information about the General
mailing list