Hello,
I am currently working through the opensuse reference manual, and am attempting to run a BIND DNS.
Attempting to use both yast, and the CL leads me to the same issue:
named-checkconf /etc/named.conf
/etc/rndc.key:1: key 'rndc-key': already exists previous definition: /etc/rndc.key:1
/etc/rndc.key:1: key 'rndc-key': already exists previous definition: /etc/rndc.key:1
systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-06-16 16:44:03 EDT; 42min ago
Process: 21145 ExecStart=/usr/sbin/named.init start (code=exited, status=6)
Jun 16 16:44:03 linux-7paf systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
Jun 16 16:44:03 linux-7paf named.init[21145]: Starting name server BIND
Jun 16 16:44:03 linux-7paf named.init[21208]: Starting name server BIND
Jun 16 16:44:03 linux-7paf named.init[21208]: etc/named.conf:17
Jun 16 16:44:03 linux-7paf systemd[1]: named.service: Control process exited, code=exited, status=6/NOTCONFIGURED
Jun 16 16:44:03 linux-7paf systemd[1]: named.service: Failed with result 'exit-code'.
Jun 16 16:44:03 linux-7paf systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
If I delete the /etc/rndc-key:
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-06-16 17:42:35 EDT; 7s ago
Process: 28201 ExecStart=/usr/sbin/named.init start (code=exited, status=6)
Jun 16 17:42:35 linux-7paf named.init[28201]: Warning: File /etc/rndc.key not found. Creating it.
Jun 16 17:42:35 linux-7paf named.init[28242]: rndc-confgen: The -r option has been deprecated.
Jun 16 17:42:35 linux-7paf named.init[28243]: chmod: cannot access '/etc/rndc.key': No such file or directory
Jun 16 17:42:35 linux-7paf named.init[28244]: chown: cannot access '/etc/rndc.key': No such file or directory
Jun 16 17:42:35 linux-7paf named.init[28201]: Warning: File /etc/rndc.key not found. Skipping.
Jun 16 17:42:35 linux-7paf named.init[28201]: Warning: File /etc/rndc.key not found. Skipping.
Jun 16 17:42:35 linux-7paf named.init[28266]: /etc/rndc.key:1: key 'rndc-key': already exists previous definition: /etc/rndc.key:1
Jun 16 17:42:35 linux-7paf systemd[1]: named.service: Control process exited, code=exited, status=6/NOTCONFIGURED
Jun 16 17:42:35 linux-7paf systemd[1]: named.service: Failed with result 'exit-code'.
Jun 16 17:42:35 linux-7paf systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
named.conf file (I have left out comments, and line 17 being “options {”
options {
# The directory statement defines the name server's working directory
directory "/var/lib/named";
dnssec-validation auto;
managed-keys-directory "/var/lib/named/dyn/";
listen-on port 53 { 127.0.0.1; };
listen-on-v6 { any; };
allow-query { 127.0.0.1; };
notify no;
disable-empty-zone "1.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";
include "/etc/named.d/forwarders.conf";
};
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
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 "127.0.0.zone";
};
include "/etc/named.conf.include";
zone "dnsmz.com" in {
file "master/dnsmz.com";
type master;
allow-transfer { any; };
};
logging {
category xfer-in { log_syslog; };
category xfer-out { log_syslog; };
category default { log_syslog; };
channel log_syslog { syslog; };
};
# You can insert further zone records for your own domains below or create
# single files in /etc/named.d/ and add the file names to
# NAMED_CONF_INCLUDE_FILES.
# See /usr/share/doc/packages/bind/README.SUSE for more details.
include "/etc/rndc.key";
controls { inet 127.0.0.1 port 953 allow { localhost; } keys { "rndc-key"; };};
zone "1.0.168.192.in-addr.arpa" in {
allow-transfer { any; };
file "master/1.0.168.192.in-addr.arpa";
type master;
}
cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20200614"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20200614"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20200614"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
LOGO="distributor-logo"
If any more information is need please let me know, any help is appreciated.