How to resolve a domain name with Bind9


I am really confused on how to solve bind9, I sent bind9 a request for help about a month ago and I have never heard of any response. I've installed bind9 bind9utils bind9-doc bind9-host and i also set up my hosts file as follows so that i can bind my host name to that too

echo -e "192.168.1.142 Evil.com Inspire" >> / etc / hosts

hostnamectl set-hostname Inspire

Then I was able to run ping -c Evil.com and receive a response after enabling ICMP requests, my next step is to configure the named.conf.options drop for my preferences

acl TrustedPPL {192.168.1.0/24; 192.168.1.142; };

acAc NoAccess {192.168.1.111; };

options {
directory "/ var / cache / bind";

allow-query {TrustedPPL; };
blackhole {NoAccess; };

recursion yes;

allow-recursion {local networks; 192.168.1.0/24; };
listening port 53 {192.168.1.142; 127.0.0.1; };
senders {192.168.1.1; 8.8.8.8; 8.8.4.4; };

dnssec-auto validation;
dnssec-lookaside auto;
dnssec-enable yes;
auth-nxdomain no;

tcp-listen-queue 25;
transfers-in 25;
outgoing transfers 25;
tcp-clients 200;
};

At this point, I restarted bind9 so that all errors are reported to me. There was no mistake. I have therefore created the name of the zone and the zone file. I also included the contents of the zone files.

echo -e "zone" Evil.com "IN {type master; file "/etc/bind/db.Domain.zone"; }; & # 39; > /etc/bind/named.conf.local

Zone file /etc/bind/db.Domain.zone

    $ TTL 3h

@ IN SOA Evil.com. snakes.gmail.com. (
15; Serial
3h; Refresh
1h; try again
1w; Expire
1h); TTL negative cover

@ IN NS Evil.com.
@ IN A 192.168.1.142

Then I used dig Evil.com and I had an answer showing that IPv4 was 192.168.1.142, and then I confirmed it with nslookup and he also came back accurate, so I decided to test the resolution part of it and I changed @ IN A 192.168.1.142 A 192.168.1.111 I then changed the serial number and restarted bind9 without error, I did a dig Evil.com and he returned 192.168.1.142 again. So at this point I was curious and I completely deleted the file with db.local, as well as dig and nslookup show that bind9 does not even detect its own resolution file, any idea?


That's my /etc/nsswitch.conf file

passwd: compat systemd
group: compat systemd
shadow: compat
gshadow: files

hosts: dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

network group: nis

I have tried with the original /etc/bind/named.conf.options the file too and there was no change, I use manly use linux mint, but that does not work on kali linux either

There is also no Dnsmasq or NSCD caching daemon.