2

This is my DNS forward file and it gives me error when I want to run it as a service. I think it's a syntax error but don't know how to correct it?

$TTL 86400
@   IN  SOA     ns1.sudia.com. root.sudia.com. (
                                              3           ;Serial
                                              3600        ;Refresh
                                              1800        ;Retry
                                              604800      ;Expire
                                              86400       ;Minimum TTL
)
@   IN  SOA     ns2.sudia.com. root.sudia.com. (
                                              3           ;Serial
                                              3600        ;Refresh
                                              1800        ;Retry
                                              604800      ;Expire
                                              86400       ;Minimum TTL
)



;Name Server Information
@       IN  NS      ns1.sudia.com.
@       IN  NS      ns2.sudia.com.

;IP address of Name Server
ns1       IN  A       136.243.197.164
ns2       IN  A       136.243.197.164

;A - Record HostName To Ip Address
sudia.com.     IN  A       136.243.197.164
www             IN  A       136.243.197.164

;CNAME record
ftp     IN CNAME        www.sudia.com.

And this is the error:

(base) [root@wdrserver named]# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-06-22 23:39:21 +0430; 13s ago
  Process: 3135 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 3110 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS)
  Process: 3233 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (co>
 Main PID: 3111 (code=exited, status=0/SUCCESS)

Jun 22 23:39:21 wdrserver bash[3233]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Jun 22 23:39:21 wdrserver bash[3233]: zone 0.in-addr.arpa/IN: loaded serial 0
Jun 22 23:39:21 wdrserver bash[3233]: dns_master_load: fwd.sudia.com.db:28: sudia.com: multiple RRs of singleton type
Jun 22 23:39:21 wdrserver bash[3233]: zone sudia.com/IN: loading from master file fwd.sudia.com.db failed: multiple RRs of singleton type
Jun 22 23:39:21 wdrserver bash[3233]: zone sudia.com/IN: not loaded due to errors.
Jun 22 23:39:21 wdrserver bash[3233]: _default/sudia.com/IN: multiple RRs of singleton type
Jun 22 23:39:21 wdrserver bash[3233]: zone 197.243.136.in-addr.arpa/IN: loaded serial 3
Jun 22 23:39:21 wdrserver systemd[1]: named.service: Control process exited, code=exited status=1
Jun 22 23:39:21 wdrserver systemd[1]: named.service: Failed with result 'exit-code'.
Jun 22 23:39:21 wdrserver systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).

1 Answer 1

0

The key error is multiple RRs of singleton type. In short, you cannot have more than one SOA record for the zone. You need to remove:

@   IN  SOA     ns2.sudia.com. root.sudia.com. (
                                              3           ;Serial
                                              3600        ;Refresh
                                              1800        ;Retry
                                              604800      ;Expire
                                              86400       ;Minimum TTL
)

So, the updated version of your example zone would be:

ex. var/named/fwd.sudia.com.db

$TTL 86400
@   IN  SOA     ns1.sudia.com. root.sudia.com. (
                                              5           ;Serial
                                              3600        ;Refresh
                                              1800        ;Retry
                                              604800      ;Expire
                                              86400       ;Minimum TTL
)

;Name Server Information
@       IN  NS      ns1.sudia.com.
@       IN  NS      ns2.sudia.com.

;IP address of Name Server
ns1       IN  A       136.243.197.164
ns2       IN  A       136.243.197.164

;A - Record HostName To Ip Address
sudia.com.     IN  A       136.243.197.164
www            IN  A       136.243.197.164

;CNAME record
ftp     IN CNAME        www.sudia.com.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .