DNS Errors in CentOS

Introduction

WARNING: recursion requested but not available

If you run dig on the server and get the error

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.7 <<>> www.heihei.ru @192.168.56.149 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 7931 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;www.heihei.ru. IN A ;; Query time: 1 msec ;; SERVER: 192.168.56.149#53(192.168.56.149) ;; WHEN: Mon Sep 13 14:48:56 EEST 2021 ;; MSG SIZE rcvd: 42

Then, most likely, you did not specify in named.conf the required values in allow-query { localhost; };

Read the solution to this problem here

connection timed out; no servers could be reached

This error may have several similar causes

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.7 <<>> www.aviasales.com @192.168.56.149 ;; global options: +cmd ;; connection timed out; no servers could be reached

You are making a query on a server that has

listen-on port 53 { 127.0.0.1; };

That is, it listens only on localhost

Read the solution to this problem here

Article author: Andrei Olegovich

Banner image