The problem with raising the DNS server on Ubuntu 20.04 - bind9

21 Views Asked by At

after installation, I changed only 4 files. Then I rebooted daemon (daemon-restart) and bind9 (bind9.service). A startup error pops up (see image). I have edited the following documents:

=======================db.local=======================
;
; BIND data file for local loopback interface
;
$TTL    604800
prudnikov.ru.   IN      SOA     ns1.prudnikov.ru.
root.prudnikov.ru.  (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;

prudnikov.ru.   IN      NS      ns1.prudnikov.ru.
prudnikov.ru.   IN      MX      10      mail.prudnikov.ru.
prudnikov.ru.   IN      A       10.0.10.1
ns1     IN      A       10.0.10.1
www     IN      CNAME   prudnikov.ru.
mail    IN      A       10.0.10.1
=======================db.255=======================
;
; BIND reverse data file for broadcast zone
;
$TTL    604800
10.0.10.in-addr.arpa.   IN      SOA     ns1.prudnikov.ru.
root.prudnikov.ru.  (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
10.0.10.in-addr.arpa.   IN      NS      ns1.prudnikov.ru.
1.10.0.10.in-addr.arpa. IN      PTR     prudnikov.ru.
=======================named.conf.options=======================
options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

         forwarders {
                8.8.8.8;
         };
        listen-on port 53 { 10.0.10.0/24; };
        allow-query { 10.0.10.0/24; };


        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================

        dnssec-validation auto;
        auth-nxdomain no;
        listen-on-v6 { any; };
};
=======================named.conf.local=======================
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "prudnikov.ru." {
type master;
file "/etc/bind/db.local";
};

zone ""10.0.10.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};

reinstalled and restarted services. in the name.service file, I added "ExecStart=/usr/sbin/named -4 -f $OPTIONS" in the line. the file is here:

===================/etc/systemd/system/bind9.service=================
[Unit]
Description=BIND Domain Name Server
Documentation=man:named(8)
After=network.target
Wants=nss-lookup.target
Before=nss-lookup.target

[Service]
Type=forking
EnvironmentFile=-/etc/default/named
ExecStart=/usr/sbin/named $OPTIONS
ExecReload=/usr/sbin/rndc reload
ExecStop=/usr/sbin/rndc stop
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=bind9.service

0

There are 0 best solutions below