View Full Version : Caching only name server
* Tong *
07-24-2004, 10:07 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
* Tong *
07-24-2004, 10:07 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
ynotssor
07-24-2004, 10:07 PM
"* Tong *" <sun_tong@users.sourceforge.net> wrote in message
news:81e09e8e9c988c898038280a40f52b50@news.teranews.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! =-----
David Efflandt
07-24-2004, 10:07 PM
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/
vBulletin v3.0.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.