Bluehost.com Web Hosting $6.95

Caching only name server

This is a discussion on Caching only name server within the Linux Networking forums, part of the Linux Forums category; Hi, I've successfully setup my local caching only name server for my dial up connection. Also, according to the ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-23-2003
* Tong *
 
Posts: n/a
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
Reply With Quote
  #2 (permalink)  
Old 10-23-2003
* Tong *
 
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 (permalink)  
Old 10-23-2003
ynotssor
 
Posts: n/a
Default Re: Caching only name server

"* Tong *" <sun_tong@users.sourceforge.net> wrote in message
news:81e09e8e9c988c898038280a40f52b50@news.teranew 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 (permalink)  
Old 10-23-2003
David Efflandt
 
Posts: n/a
Default Re: Caching only name server

On Wed, 22 Oct 2003, * Tong * <sun_tong@users.sourceforge.net> 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 Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0