LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   DNS server (bind9) working but not pinging (https://www.linuxquestions.org/questions/debian-26/dns-server-bind9-working-but-not-pinging-715693/)

linx win 03-31-2009 02:21 AM

DNS server (bind9) working but not pinging
 
I have installed a DNS server using bind9. I created an internal zone linux.bogus per insrtuctions shown in:
http://www.tldp.org/HOWTO/DNS-HOWTO-5.html
My linux.bogus zone file is as follows:
Code:

;
; Zone file for linux.bogus
;
; The full zone file
;
$TTL 3D
@      IN      SOA    ns.linux.bogus. hostmaster.linux.bogus. (
                        199802151      ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        4W              ; expire, seconds
                        1D )            ; minimum, seconds
;
                TXT    "Linux.Bogus, your DNS consultants"
                NS      ns              ; Inet Address of name server
                NS      ns.friend.bogus.
                MX      10 mail        ; Primary Mail Exchanger
                MX      20 mail.friend.bogus. ; Secondary Mail Exchanger

localhost      A      127.0.0.1

gw              A      192.168.196.1
                TXT    "The router"

ns              A      192.168.196.2
                MX      10 mail
                MX      20 mail.friend.bogus.
www            CNAME  ns

donald          A      192.168.196.3
                MX      10 mail
                MX      20 mail.friend.bogus.
                TXT    "DEK"

mail            A      192.168.196.4
                MX      10 mail
                MX      20 mail.friend.bogus.

ftp            A      192.168.196.5
                MX      10 mail
                MX      20 mail.friend.bogus.

The 127.0.0 zone is as follows:

Code:

$TTL 3D
@              IN      SOA    ns.linux.bogus. hostmaster.linux.bogus. (
                                1      ; Serial
                                8H      ; Refresh
                                2H      ; Retry
                                4W      ; Expire
                                1D)    ; Minimum TTL
                        NS      ns.linux.bogus.
1                      PTR    localhost.

DNS server started successfully, but when I do dig any linux.bogus, I get the following:
Code:

root@ns:/etc# dig any linux.bogus

; <<>> DiG 9.5.1-P2 <<>> any linux.bogus
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 18622
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;linux.bogus.                        IN        ANY

;; AUTHORITY SECTION:
.                        9613        IN        SOA        A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009033101 1800 900 604800 86400

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 31 22:20:56 2009
;; MSG SIZE  rcvd: 104

As you can see, I get ANSWER: 0. Also when I do dig linux.bogus axfr, I get the following:

Code:

root@ns:/etc# dig linux.bogus axfr
; <<>> DiG 9.5.1-P2 <<>> linux.bogus axfr
;; global options:  printcmd
; Transfer failed.

Does any body know how to correct these issues?

My named.conf is as follows:
Code:

// Config file for caching only name server
//
// The version of the HOWTO you read may contain leading spaces
// (spaces in front of the characters on these lines ) in this and
// other files.  You must remove them for things to work.
//
// Note that the filenames and directory names may differ, the
// ultimate contents of should be quite similar though.

options {
        directory "/etc/bind";
        pid-file "/var/run/bind/run/named.pid";
        };

zone "." {
        type hint;
        file "/etc/bind/db.cache";
        };

zone "0.0.127.in-addr.arpa" {
        type master;
        file "pz/127.0.0";
};

key rndc-key {
        algorithm hmac-md5;
        secret "XXXXXXXXX";
        };
controls {
        inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { rndc-key; };
        };

          forward first;
          forwarders {
                10.0.0.1;
                10.0.0.2;
            };

zone "linux.bogus" {
        type master;
        notify no;
        file "pz/linux.bogus";
};

My PC hostname is:
Code:

root@ns:/etc# hostname
ns.linux.bogus


linx win 03-31-2009 04:01 PM

Update:

I deleted the following from named.conf:

forward first;
forwarders {
10.0.0.1;
10.0.0.2;

It is working fine now.


All times are GMT -5. The time now is 09:49 PM.