dns server bind is not work

Posted by milad on Server Fault See other posts from Server Fault or by milad
Published on 2012-10-12T19:51:08Z Indexed on 2012/10/14 21:40 UTC
Read the original article Hit count: 344

Filed under:
|
|

I just installed bind on RHEL 6 and point a domain to that server. but actually when i ping domain it returns error 1214: Here is my named.conf:

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
    listen-on port 53 { any; };
    listen-on-v6 port 53 { ::1; };
    directory       "/var/named";
    dump-file       "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query     { any; };
    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;

    /* Path to ISC DLV key */
    bindkeys-file "/etc/named.iscdlv.key";

    managed-keys-directory "/var/named/dynamic";
};

logging {
    channel default_debug {
            file "data/named.run";
            severity dynamic;
    };
};

zone "." IN {
    type hint;
    file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
zone "mydomain.com"{
    type master;
    file "/var/named/data/named.mydomain.com";
    allow-update { none; };
 };`

AND The content of "/var/named/data/named.mydomain.com":

$TTL 38400

mydomain.com. IN SOA ns1.mydomain.com. milad.yahoo.com. (
2012101201 ; serial number YYMMDDNN
28800 ; Refresh
7200 ; Retry
864000 ; Expire
38400 ; Min TTL
)

mydomain.com. IN A 1.2.3.4
www IN A 1.2.3.4
ns1.mydomain.com. IN A 1.2.3.4
ns2.mydomain.com. IN A 1.2.3.4
mydomain.com. IN NS ns1.mydomain.com.
mydomain.com. IN NS ns2.mydomain.com.

AND i'm sure the named service is running:

[root@server ~]# service named status
version: 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.3
CPUs found: 8
worker threads: 8
number of zones: 20
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
named (pid 26299) is running...

Thanks for your answers. i know that the ping is not the job of bind, i use it just to check whether domain is pointed to host or not.(ping is open in my server as i got reply in pinging ip) i use network-tools.com to ping domain. here the output of dig utility: dig mydomain.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.3 <<>> mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 6806
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mydomain.com.          IN  A

;; Query time: 321 msec
;; SERVER: 5.6.7.8#53(5.6.7.8)##note that 5.6.7.8 is my idc dns ip
;; WHEN: Sun Oct 14 23:53:47 2012

© Server Fault or respective owner

Related posts about linux

Related posts about dns