Networking Forums

Networking Forums > Computer Networking > Linux Networking > Caching only name server

Reply
Thread Tools Display Modes

Caching only name server

 
 
* Tong *
Guest
Posts: n/a

 
      10-22-2003, 10:35 PM
Hi,

I've successfully setup my local caching only name server for my dial up
connection. Also, according to the faq, I add the forward section to the
dns option section. It also works fine.

However, I noticed that my local setting, which are in my /etc/hosts,
are no longer valid. How to tell my DNS server to refer to my /etc/hosts
first, then its cache, and last forward unknown host to my ISP's dns
server?

Thanks

PS.

my dns option section looks something like this:

options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
forward first;
forwarders {
10.0.0.1;
10.1.0.1;
};
};


--
Tong (remove underscore(s) to reply)
*niX Power Tools Project: http://xpt.sourceforge.net/
- All free contribution & collection
 
Reply With Quote
 
 
 
 
* Tong *
Guest
Posts: n/a

 
      10-22-2003, 11:01 PM
On Wed, 22 Oct 2003 22:35:29 +0000, * Tong * wrote:

> Hi,
>
> I've successfully setup my local caching only name server for my dial up
> connection. Also, according to the faq, I add the forward section to the
> dns option section. It also works fine.
>
> However, I noticed that my local setting, which are in my /etc/hosts,
> are no longer valid. How to tell my DNS server to refer to my /etc/hosts
> first, then its cache, and last forward unknown host to my ISP's dns
> server?
>
> Thanks
>
> PS.
>
> my dns option section looks something like this:
>
> options {
> directory "/var/named";
> /*
> * If there is a firewall between you and nameservers you want
> * to talk to, you might need to uncomment the query-source
> * directive below. Previous versions of BIND always asked
> * questions using port 53, but BIND 8.1 uses an unprivileged
> * port by default.
> */
> // query-source address * port 53;
> forward first;
> forwarders {
> 10.0.0.1;
> 10.1.0.1;
> };
> };


Hmm... to be more precisely:

I was trying to give an alias name to a foreign host. E.g., in my
/etc/hosts there are 2 entries.

127.0.0.1 test2
google.com gg

I hope that I can use "gg" as a short cut for google, in my caching only
name server environment. Thanks

--
Tong (remove underscore(s) to reply)
*niX Power Tools Project: http://xpt.sourceforge.net/
- All free contribution & collection
 
Reply With Quote
 
ynotssor
Guest
Posts: n/a

 
      10-22-2003, 11:14 PM
"* Tong *" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) s.com

> I was trying to give an alias name to a foreign host. E.g., in my
> /etc/hosts there are 2 entries.
>
> 127.0.0.1 test2
> google.com gg
>
> I hope that I can use "gg" as a short cut for google, in my caching
> only name server environment. Thanks


/etc/hosts doesn't work that way:
IP_address canonical_hostname aliases

Consult the man page for further information.

--
use hotmail com for any email replies


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      10-23-2003, 01:17 AM
On Wed, 22 Oct 2003, * Tong * <(E-Mail Removed)> wrote:
> On Wed, 22 Oct 2003 22:35:29 +0000, * Tong * wrote:
>
>> Hi,
>>
>> I've successfully setup my local caching only name server for my dial up
>> connection. Also, according to the faq, I add the forward section to the
>> dns option section. It also works fine.
>>
>> However, I noticed that my local setting, which are in my /etc/hosts,
>> are no longer valid. How to tell my DNS server to refer to my /etc/hosts
>> first, then its cache, and last forward unknown host to my ISP's dns
>> server?
>>
>> Thanks
>>
>> PS.
>>
>> my dns option section looks something like this:
>>
>> options {
>> directory "/var/named";
>> /*
>> * If there is a firewall between you and nameservers you want
>> * to talk to, you might need to uncomment the query-source
>> * directive below. Previous versions of BIND always asked
>> * questions using port 53, but BIND 8.1 uses an unprivileged
>> * port by default.
>> */
>> // query-source address * port 53;
>> forward first;
>> forwarders {
>> 10.0.0.1;
>> 10.1.0.1;
>> };
>> };

>
> Hmm... to be more precisely:
>
> I was trying to give an alias name to a foreign host. E.g., in my
> /etc/hosts there are 2 entries.
>
> 127.0.0.1 test2
> google.com gg
>
> I hope that I can use "gg" as a short cut for google, in my caching only
> name server environment. Thanks


127.0.0.1 should always be localhost. If you want to assign your actual
hostname to an IP, either use a LAN nic IP, or an extra loopback IP like
127.0.0.2 if you have no real interface that is always up. Your second
line is invalid. See 'man hosts' for proper format.

While /etc/hosts may be used by programs that use gethostbyname(), it will
not work for things that use DNS only (like nslookup or host command).
If you wanted to set up such an alias for google you would need to add a
properly configured zone for "gg" to work with your named (like gg. as
CNAME for www.google.com. including trailing dots). See the DNS HOWTO.
But do not expect something like that in a URL to work for name based
virtual hosts, which serve different content based on Host header from
browser.

--
David Efflandt - All spam ignored http://www.de-srv.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server accelerator options: Squid, apache's built-in web caching orhardware "solutions" lbrtchx@gmail.com Linux Networking 0 01-12-2008 09:42 AM
Caching using 2003 Server Seamus Windows Networking 3 06-29-2005 03:55 PM
How do DNS Clients use a Caching only or Secondary DNS Server with Dynamic Updats? Brian Whiting Windows Networking 3 02-13-2005 05:34 PM
Caching nameserver Cameron Kerr Linux Networking 5 06-30-2004 04:24 PM
Bind as caching server Doug Laidlaw Linux Networking 9 04-25-2004 09:07 AM



1 2 3 4 5 6 7 8 9 10 11