LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   restored dns error at centos 5.3 (https://www.linuxquestions.org/questions/linux-newbie-8/restored-dns-error-at-centos-5-3-a-763504/)

windstory 10-21-2009 02:05 PM

[Resolved]restored dns error at centos 5.3
 
I have backed up dns files with tar command from redhat 9, and restore them to centos 5.3 x86, but named has an error as follows;

Code:

[root@myserver _work]# service named start
Starting named:
Error in named configuration:
zone localdomain/IN: loaded serial 42
zone myserver.org/IN: loaded serial 42
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
dns_rdata_fromtext: zone-57.250.203.in-addr.arpa:2: near '20050309012': out of range
zone 57.250.203.in-addr.arpa/IN: loading master file zone-57.250.203.in-addr.arpa: out of range
_default/57.250.203.in-addr.arpa/IN: out of range
zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 1997022700
zone 255.in-addr.arpa/IN: loaded serial 42
zone 0.in-addr.arpa/IN: loaded serial 42
 [FAILED]

My dns files are here;

1. named.conf
Code:

//
// named.conf for Red Hat caching-nameserver
//myserver.org (named.conf)

options {
        directory "/var/named";
        dump-file "/var/tmp/named_dmp.db";
        statistics-file "/var/tmp/named.stats";
        pid-file "/var/run/named/named.pid";
        allow-transfer {203.250.57.28; };   
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

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

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};
zone "myserver.org" IN {
        type master;
        file "myserver.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "57.250.203.in-addr.arpa" IN {
        type master;
        file "zone-57.250.203.in-addr.arpa";
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

include "/etc/rndc.key";

2. zone-57.250.203.in-addr.arpa

Code:

$TTL    3600
@      IN      SOA            ns.myserver.org. root.myserver.org. (
                                20050309012      ;Serial
                                21600          ;Refresh        ( 6 hours )
                                1800            ;Retry          ( 30 minutes )
                                1209600        ;Expire        ( 14 days )
                                86400 )        ;Minimum        ( 1 day )
        IN      NS              ns.myserver.org.

240    IN      PTR            ns.myserver.org.

Any comment would be appreciated.

windstory 10-21-2009 03:59 PM

At zone-57.250.203.in-addr.arpa,

20050309012 ;Serial

was wrong.

Changed 2005030901 from 20050309012, and fixed.

harry edwards 10-21-2009 04:30 PM

FYI: You can use a tool called named-checkconf and named-checkzone to check BIND dns server (named daemon) configuration and zone file syntax under Linux / UNIX. It checks the syntax, but not the semantics, of a named configuration file i.e. it can check for syntax errors or typographical errors but cannot check for wrong MX / A address assigned by you. Nevertheless, this is an excellent tool for troubleshooting DNS server related problems.

chrism01 10-21-2009 07:45 PM

Glad you got it fixed. This is a really good Deployment guide for RHEL/Centos v5 http://www.linuxtopia.org/online_boo...ion/index.html

windstory 03-09-2010 08:06 PM

Quote:

Originally Posted by harry edwards (Post 3727713)
FYI: You can use a tool called named-checkconf and named-checkzone to check BIND dns server (named daemon) configuration and zone file syntax under Linux / UNIX. It checks the syntax, but not the semantics, of a named configuration file i.e. it can check for syntax errors or typographical errors but cannot check for wrong MX / A address assigned by you. Nevertheless, this is an excellent tool for troubleshooting DNS server related problems.

Thanks for your kind advice.

windstory 03-09-2010 08:06 PM

Quote:

Originally Posted by chrism01 (Post 3727876)
Glad you got it fixed. This is a really good Deployment guide for RHEL/Centos v5 http://www.linuxtopia.org/online_boo...ion/index.html

Thanks for your kind advice.


All times are GMT -5. The time now is 04:31 PM.