Article 533F6 What kind of DNS server should I make?

What kind of DNS server should I make?

by
ddenial
from LinuxQuestions.org on (#533F6)
Hello All,

I have created a virtual lab environment to practice Linux. This includes
  1. Local LAN (192.168.1.0/24, Zone: cntnix.lan)
  2. KVM LAN (192.168.122.0/24, Zone: kvmlab.lan)
I have also setup an Authoritative Bind DNS server in cntnix.lan zone with IP address 192.168.1.7, which resolves both cntnix.lan and kvmlab.lan zones. No problem here.

But the problem is, according to this site, and others are that they mention the authoritative server should not be recursive.

If I set 'recursion no;' in named.conf, I cant resolve the outside world.

Code:$ dig google.com

; <<>> DiG 9.11.13-RedHat-9.11.13-3.el8 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 46199
;; 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
; COOKIE: 52147db2a87cd9a1bd221d075eb25afb776d5bb0e8ef5ded (good)
;; QUESTION SECTION:
;google.com. IN A

;; Query time: 0 msec
;; SERVER: 192.168.1.7#53(192.168.1.7)
;; WHEN: Wed May 06 12:06:43 IST 2020
;; MSG SIZE rcvd: 67The way I have set up now is like this in named.conf
Code:recursion yes;
forward only;
forwarders { 8.8.4.4; 8.8.8.8; };

zone "cntnix.lan." IN {
type master;
file "cntnix.lan.fwd";
allow-update { none; };
};

zone "1.168.192.in-addr.arpa." IN {
type master;
file "cntnix.lan.rev";
allow-update { none; };
};

zone "kvmlab.lan." IN {
type master;
file "kvmlab.lan.fwd";
allow-update { none; };
};

zone "122.168.192.in-addr.arpa." IN {
type master;
file "kvmlab.lan.rev";
allow-update { none; };
};...which is working fine, but it also makes a caching server, forward only server and authoritative server - A cocktail server. How do I deal with this problem.

All I want is
"An authoritative server which resolves local zones, but also resolves outside world"

Thankslatest?d=yIl2AUoC8zA latest?i=pJvxrm7uZGw:DjPR73xplaI:F7zBnMy latest?i=pJvxrm7uZGw:DjPR73xplaI:V_sGLiP latest?d=qj6IDK7rITs latest?i=pJvxrm7uZGw:DjPR73xplaI:gIN9vFwpJvxrm7uZGw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments