--- In [email protected], "DoOrsOfpErcEpTioN" <msgcof...@...> wrote:
>
> 
> --- In [email protected], "senty_dil" <arpittolani@>
> wrote:
> >
> > This is how my named.conf looks like
> <truncated>
> -------------------
> > view "internal"
> > {
> > /* This view will contain zones you want to serve only to "internal"
> clients
> >    that connect via your directly attached LAN interfaces -
> "localnets" .
> >  */
> >         match-clients           { localnets; };
> >         match-destinations      { localnets; };
> >         recursion yes;
> -------------------
> Here you seem to have defined views in named. matching client localnets.
> Where is localnets defined?
> 
> -------------------
> >         zone "lnmiit.ac.in" {
> >                 type master;
> >                 allow-query { any; };
> >                 file "server.zone";
> >         };
> 
> Here I suggest you to practice naming zone files with domain names. As
> of now you have just one domain, but with many domains you will find it
> difficult to manage. So, ideally zone file should be lnmiit.ac.in.zone
> instead of server.zone.
> -------------------
> 
> -------------------
> > i am not able to dig my servers. error comes while dig
> >
> > dig www.lnmiit.ac.in
> >
> > ; <<>> DiG 9.3.3rc2 <<>> www.lnmiit.ac.in
> > ;; global options:  printcmd
> > ;; Got answer:
> > ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 34447
> > ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
> >
> > ;; QUESTION SECTION:
> > ;www.lnmiit.ac.in.              IN      A
> >
> > ;; Query time: 16 msec
> > ;; SERVER: 127.0.0.1#53(127.0.0.1)
> > ;; WHEN: Wed Aug 12 21:16:09 2009
> > ;; MSG SIZE  rcvd: 34
> >
> >
> > Can someone help me with it where i am wrong and why there is SERVFAIL
> in the answers..
> >
> -------------------
> 
> What does the log say about the query ?
> tail /var/log/messages in another shell and see what entries appear
> while querying.
> I think the issue may be with VIEW statement. Just a wild guess!  But do
> check out the logs for help.
> 
> If you are using Bind 9.5, then there will be various log files and even
> config files are split.
> 
> regards,
> ~ doors
> 
> 
> 
> [Non-text portions of this message have been removed]
>


Hi,

hmm.. localnets seems to be the defaults. It should have resolved for locahost 
though!  :(

Please refer the following url to get an idea of view statements in named. 

http://www.zanshu.com/ebook/298_linux_server_hacks/0596004613_linuxsvrhack-CHP-8-SECT-2.html

In my DNS server I use internal, external and reverse as views using include 
statement. So my config file is a bit different and some even find it 
complicated   :)

eg of my named.conf:
------
// named.conf for Red Hat caching-nameserver 
//

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; rndc-key; };
};
acl "recursive_subnets" {
         172.16.0.0/16;
         192.168.0.0/16;
         x.x.x.x/24;
         x.x.x.x/25;
         x.x.x.x;
         localhost;
};
include "/etc/rndc.key";
options {
         allow-recursion { "recursive_subnets"; };
         directory "/var/named";
         dump-file "/var/named/data/cache_dump.db";
         statistics-file "/var/named/data/named_stats.txt";
         version "No Way JOSE";
         recursion yes;
//       recursive-clients       20000;
         rrset-order { class ANY type ANY name "*" order cyclic ; };
};
zone  "." {
         type hint;
file  "named.ca";
};

view "internal" {
               match-clients { 192.168.0.0/16; 172.16.0.0/16; };
                include "/etc/named-internal.conf";
}; 
view "external" {
               match-clients { any; };
                include "/etc/named-external.conf";
};
--------
/etc/named-internal.conf
The above file has zone definitions for internal network

/etc/named-external.conf
This one has all zones open to internet query.

 --- zone definitions in /etc/named-internal.conf -- 
// These are internal zones:
zone "domain1.com" {
                       type master;
                       notify no;
                       file "internalzones/domain1.com.int";
               };
-----------------------------------

Hope this helps you.

Reply via email to