Good day, I am trying to follow this DNS server setup tutorial
Here's what I was hoping to setup
win10 | 192.168.1.247
ns1 | 192.168.1.203
mint | 192.168.1.183
domain: nyc3.example.com
my named-checkconf returns correctly, but when I try to run $systemctl start named, I cannot start it.
$systemctl status named.service - l
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 Sun 2023-08-13 00:12:39 EDT; 17s ago
Process: 76083 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 (code=exited, status=1/FAILURE)
Aug 13 00:12:39 dnsCentOS bash[76083]: _default/0.in-addr.arpa/IN: file not found
Aug 13 00:12:39 dnsCentOS bash[76083]: zone nyc3.example.com/IN: loading from master file etc/named/zones/db.nyc3.example.com failed: file not found
Aug 13 00:12:39 dnsCentOS bash[76083]: zone nyc3.example.com/IN: not loaded due to errors.
Aug 13 00:12:39 dnsCentOS bash[76083]: _default/nyc3.example.com/IN: file not found
Aug 13 00:12:39 dnsCentOS bash[76083]: /etc/named/zones/db.192:1: no TTL specified; using SOA MINTTL instead
Aug 13 00:12:39 dnsCentOS bash[76083]: zone 192.in-addr.arpa/IN: loaded serial 3
Aug 13 00:12:39 dnsCentOS systemd[1]: named.service: control process exited, code=exited status=1
Aug 13 00:12:39 dnsCentOS systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Aug 13 00:12:39 dnsCentOS systemd[1]: Unit named.service entered failed state.
Aug 13 00:12:39 dnsCentOS systemd[1]: named.service failed.
Here's my /etc/named.conf. I tried changing to a different directory, it seemed to not work
options {
listen-on port 53 { 127.0.0.1; 192.168.1.201; };
directory "/etc/named/zones";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { trusted; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
bindkeys-file "/etc/named.root.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
acl "trusted" {
192.168.1.201;
192.168.1.247;
192.168.1.183;
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
include "/etc/named.conf.local";
Here's my /etc/named/named.conf.local
zone "nyc3.example.com" {
type master;
file "/etc/named/zones/db.nyc3.example.com";
};
zone "192.in-addr.arpa" {
type master;
file "/etc/named/zones/db.192";
};
Here's my /etc/named/zones/db.nyc3.example.com
@ IN SOA ns1.nyc3.example.com. admin.nyc3.example.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers - NS records
IN NS ns1.nyc3.example.com.
; name servers - A records
ns1.nyc3.example.com. IN A 192.168.1.201
; 192.168.1.0/8 -A records
win10.nyc3.example.com. IN A 192.168.1.247
mint.nyc3.example.com. IN A 192.168.1.183
Here's my /etc/named/zones/db.192
`@ IN SOA ns1.nyc3.example.com. admin.nyc3.example.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers - NS records
IN NS ns1.nyc3.example.com.
; PTR records
201.1 IN PTR ns1.nyc3.example.com. ; 192.168.1.201
247.1 IN PTR win10.nyc3.example.com. ; 192.168.1.247
183.1 IN PTR mint.nyc3.example.com. ; 192.168.1.183
thank you