Article 5C8KA View statements in DNS server to define internal , external queries on ubuntu 20.04

View statements in DNS server to define internal , external queries on ubuntu 20.04

by
Muruganandan
from LinuxQuestions.org on (#5C8KA)
I have configured Authoritative DNS server in ubuntu 20.04 and its running fine. But when I tried define view statement to classify internal, external zones, I got the error that all the zone must be under view statements. I knew it and tried to define the zone in multiple ways under the view statements but none worked it gave different error.

Please anyone give suggestion where to place the view statements whether in
named.conf.local or named.conf.options or in named.conf.default-zones.
My config is below

named.conf.options

act "trusted" { localhost; "trusted" };

options {
listen-on port {trusted; 127.0.0.1; };
directory "/var/cache/bind";
listen-on { trusted; 127.0.0.1; };
recursion yes;
allow recursion { trusted; };
allow-transfer {sec IP }

dnssec-validation auto;

listen-on-v6 { any; };

};

named.conf.local

zone "128.88.103.in-addr.arpa" {
type master;
file "/etc/bind/db.128";
allow-transfer { 103.224.129.3; };
also-notify { 103.224.129.3; };

};

zone "129.88.103.in-addr.arpa" {
type master;
file "/etc/bind/db.129";
allow-transfer { 103.224.129.3; };
also-notify { 103.224.129.3; };
};

In named.conf, named.conf.default-zone files I have not changed anything. Now the server works fine without view statements.But I need to include that statements. Please help. I already have configured these things in CENTOS and worked fine. But in the ubuntu it seems little confusing. I have tried it in

in the named.conf.options file as below

};
view "in" {
match-clients { trusted; };
recursion yes;
};
include "/ect/bind/named.conf.default-zones";

it did not work, then I changed it like

view "in" {
include "/ect/bind/named.conf.default-zones";
match-clients { trusted; };
recursion yes;
};
include :/etc/bind/zone.rfc1918;"

but no luck. I did this same thing on files named.conf.local and even in named.conf no one method gave me success and I'm tired
The same server is working fine without view statements.

Please suggest how to define view statements in bind version 19.6.latest?d=yIl2AUoC8zA latest?i=QmYtAjjEIEs:HDO1x0DTTrQ:F7zBnMy latest?i=QmYtAjjEIEs:HDO1x0DTTrQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=QmYtAjjEIEs:HDO1x0DTTrQ:gIN9vFwQmYtAjjEIEs
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