Score:-2

dig/nslookup gives back a servfail error

pl flag

For the past couple of days I've been walking into a certain problem I can't seem to fix. Currently I only have 1 machine in my network and it's just a RHEL 8 server with DNS and other services installed and configured. The problem is when I try to dig or use nslookup I get a servfail error. Can anyone spot if I have configured anything wrong?

Server:     192.168.50.100
Address:    192.168.50.100#53

** server can't find salt.jenna.af: SERVFAIL

Dig output:

[root@salt named]# dig salt.jenna.af

; <<>> DiG 9.11.36-RedHat-9.11.36-3.el8_6.1 <<>> salt.jenna.af
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 29195
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 13c6c973e66bb6eed834a40363600d050510d121b2e7ee40 (good)
;; QUESTION SECTION:
;salt.jenna.af.         IN  A

;; Query time: 0 msec
;; SERVER: 192.168.50.100#53(192.168.50.100)
;; WHEN: Mon Oct 31 10:59:33 PDT 2022
;; MSG SIZE  rcvd: 70

Below are my /etc/named.conf and /var/named/jenna.af.db (named.empty) files.

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
    listen-on port 53 { 127.0.0.1; any; };
        listen-on-v6 port 53 { ::1; any; };
        directory       "/var/named";
        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";
        secroots-file   "/var/named/data/named.secroots";
        recursing-file  "/var/named/data/named.recursing";
        allow-query     { localhost; any;};

};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "jenna.af" IN {
        type master;
        file "jenna.af.db";
        allow-query {any; };
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

$TTL 3H
@       IN SOA   salt.jenna.af. root.jenna.af. (
                                        311022  ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
;
@       IN      NS      localhost.
salt    IN      A       192.168.50.100
client  IN      A       192.168.50.200

If anything is unclear or more information is needed I'm happy to provide it.

Thank you in advance

guiverc avatar
cn flag
Please refer https://askubuntu.com/help/on-topic, Ubuntu and official *flavors* of Ubuntu (https://ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes.
Score:0
gn flag

You mention your server is RHEL 8. Your file names and some contents look unfamiliar, but I don't know if that is RHEL doing things differently than Ubuntu or what.

Since your server is not Ubuntu, your question is off topic here. But anyway...

I think this line:

@       IN SOA   salt.jenna.af. root.jenna.af. (

should be this:

@       IN SOA   jenna.af. root.jenna.af. (

and it should have an ip address defined. I also do not know about using localhost the way you have. Overall, I am suggesting this:

$TTL 3H
@       IN SOA   jenna.af. root.jenna.af. (
                                        311022  ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        IN      A       192.168.50.100 
;
@       IN      NS      salt.jenna.af.
salt    IN      A       192.168.50.100
client  IN      A       192.168.50.200

You should also try the named-checkzone program. In the end, I don't know more than the information the Ubuntu Serverguide provides.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.