Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Caching only name server

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2003, 11:35 PM
Default Caching only name server



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


* Tong *
Reply With Quote
  #2  
Old 10-23-2003, 12:01 AM
* Tong *
Guest
 
Posts: n/a
Default Re: Caching only name server

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
  #3  
Old 10-23-2003, 12:14 AM
ynotssor
Guest
 
Posts: n/a
Default Re: Caching only name server

"* 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
  #4  
Old 10-23-2003, 02:17 AM
David Efflandt
Guest
 
Posts: n/a
Default Re: Caching only name server

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

Tags
caching, server

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
Forum Jump


All times are GMT. The time now is 07:14 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.