Welcome to the Linux Foundation Forum!

Domain name server installation issue in centOS

HI All,

I am trying to setup DNS on my centOS server.

I am using bind software to setup DNS.

The following errors have getting.

================================================== =====

Error in named configuration:

zone localdomain/IN: loaded serial 42

zone localhost/IN: loaded serial 42

zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700

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

================================================== =====

Thank you in advanced

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 2
    it seems you don't have configured correctly the named.conf file
  • Hello Guys,

    still i am getting following errors

    [highlight]
    Error in named configuration:
    zone localdomain/IN: loaded serial 42
    zone localhost/IN: loaded serial 42
    zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
    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
    dns_rdata_fromtext: /var/named/test.com.zone:7: near eol: unexpected end of input
    zone test.com/IN: loading master file /var/named/test.com.zone: unexpected end of input
    internal/test.com/IN: unexpected end of input
    dns_rdata_fromtext: /var/named/test.com.zone:7: near eol: unexpected end of input
    zone test.com/IN: loading master file /var/named/test.com.zone: unexpected end of input
    external/test.com/IN: unexpected end of input

    [/highlight]

    Please check bellow my configuration files

    named.conf
    1. include "/etc/rndc.key";
    2.  
    3. controls {
    4. inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
    5. };
    6.  
    7. options {
    8. /* make named use port 53 for the source of all queries, to allow
    9. * firewalls to block all ports except 53:
    10. */
    11.  
    12. // query-source port 53;
    13.  
    14. /* We no longer enable this by default as the dns posion exploit
    15. has forced many providers to open up their firewalls a bit */
    16.  
    17. // Put files that named is allowed to write in the data/ directory:
    18. directory "/var/named"; // the default
    19. pid-file "/var/run/named/named.pid";
    20. dump-file "data/cache_dump.db";
    21. statistics-file "data/named_stats.txt";
    22. /* memstatistics-file "data/named_mem_stats.txt"; */
    23. allow-transfer {"none";};
    24. };
    25.  
    26. logging {
    27. /* If you want to enable debugging, eg. using the 'rndc trace' command,
    28. * named will try to write the 'named.run' file in the $directory (/var/named").
    29. * By default, SELinux policy does not allow named to modify the /var/named" directory,
    30. * so put the default debug log file in data/ :
    31. */
    32. channel default_debug {
    33. file "data/named.run";
    34. severity dynamic;
    35. };
    36. };
    37.  
    38.  
    39. // All BIND 9 zones are in a "view", which allow different zones to be served
    40. // to different types of client addresses, and for options to be set for groups
    41. // of zones.
    42. //
    43. // By default, if named.conf contains no "view" clauses, all zones are in the
    44. // "default" view, which matches all clients.
    45. //
    46. // If named.conf contains any "view" clause, then all zones MUST be in a view;
    47. // so it is recommended to start off using views to avoid having to restructure
    48. // your configuration files in the future.
    49.  
    50. view "localhost_resolver" {
    51. /* This view sets up named to be a localhost resolver ( caching only nameserver ).
    52. * If all you want is a caching-only nameserver, then you need only define this view:
    53. */
    54. match-clients { 127.0.0.0/24; };
    55. match-destinations { localhost; };
    56. recursion yes;
    57.  
    58. zone "." IN {
    59. type hint;
    60. file "/var/named/named.ca";
    61. };
    62.  
    63. /* these are zones that contain definitions for all the localhost
    64. * names and addresses, as recommended in RFC1912 - these names should
    65. * ONLY be served to localhost clients:
    66. */
    67. include "/var/named/named.rfc1912.zones";
    68. };
    69.  
    70. view "internal" {
    71. /* This view will contain zones you want to serve only to "internal" clients
    72. that connect via your directly attached LAN interfaces - "localnets" .
    73. */
    74. match-clients { localnets; };
    75. match-destinations { localnets; };
    76. recursion yes;
    77.  
    78. zone "." IN {
    79. type hint;
    80. file "/var/named/named.ca";
    81. };
    82.  
    83. // include "/var/named/named.rfc1912.zones";
    84. // you should not serve your rfc1912 names to non-localhost clients.
    85.  
    86. // These are your "authoritative" internal zones, and would probably
    87. // also be included in the "localhost_resolver" view above :
    88.  
    89. zone "test.com" {
    90. type master;
    91. file "/var/named/test.com.zone";
    92. };
    93.  
    94.  
    95. };
    96.  
    97. view "external" {
    98. /* This view will contain zones you want to serve only to "external" clients
    99. * that have addresses that are not on your directly attached LAN interface subnets:
    100. */
    101. recursion no;
    102. // you'd probably want to deny recursion to external clients, so you don't
    103. // end up providing free DNS service to all takers
    104.  
    105. // all views must contain the root hints zone:
    106. zone "." IN {
    107. type hint;
    108. file "/var/named/named.ca";
    109. };
    110.  
    111. // These are your "authoritative" external zones, and would probably
    112. // contain entries for just your web and mail servers:
    113.  
    114. // BEGIN external zone entries
    115.  
    116.  
    117. zone "test.com" {
    118. type master;
    119. file "/var/named/test.com.zone";
    120. };
    121.  
    122.  
    123. };

    test.com.zone
    1. $TTL 14400
    2. @ 86400 IN SOA ns1.test.com. (
    3. 2011031402 ; serial, todays date+todays
    4. 86400 ; refresh, seconds
    5. 7200 ; retry, seconds
    6. 3600000 ; expire, seconds
    7. 86400 ) ; minimum, seconds
    8.  
    9. test.com. 86400 IN NS ns1.test.com.
    10. test.com. 86400 IN NS ns2.test.com.
    11.  
    12.  
    13. test.com. IN A 204.12.231.44
    14.  
    15. localhost.test.com. IN A 127.0.0.1
    16.  
    17. test.com. IN MX 0 test.com.
    18.  
    19. www IN CNAME test.com.
    20. ftp IN A 204.12.231.44

    named.rfc1912.zones
    1. // named.rfc1912.zones:
    2. //
    3. // ISC BIND named zone configuration for zones recommended by
    4. // RFC 1912 section 4.1 : localhost TLDs and address zones
    5. //
    6. zone "localdomain" IN {
    7. type master;
    8. file "localdomain.zone";
    9. allow-update { none; };
    10. };
    11.  
    12. zone "localhost" IN {
    13. type master;
    14. file "localhost.zone";
    15. allow-update { none; };
    16. };
    17.  
    18. zone "0.0.127.in-addr.arpa" IN {
    19. type master;
    20. file "named.local";
    21. allow-update { none; };
    22. };
    23.  
    24. 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 {
    25. type master;
    26. file "named.ip6.local";
    27. allow-update { none; };
    28. };
    29.  
    30. zone "255.in-addr.arpa" IN {
    31. type master;
    32. file "named.broadcast";
    33. allow-update { none; };
    34. };
    35.  
    36. zone "0.in-addr.arpa" IN {
    37. type master;
    38. file "named.zero";
    39. allow-update { none; };
    40. };
  • Posts: 2
    your test.com.zone file is missing the admin email address in the second line between the server name and the parenthesis.

    the @ in the address must be replaced by a period and the address must be followed by a period.

    example:

    @ 86400 IN SOA ns1.test.com. myusername.test.com. (

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training