Disable root servers in bind [closed]

I installed a simple bind server on fedora 28.

By default dns-queries for which it has no answers are sent to the root servers.
However I want them to go to the openDNS servers.

I have removed the zone “.” entry, removed named.ca, configured forwarders but still the queries keep going to the root servers. I simply don’t understand why it keeps ignoring the settings.

I have tried with putting the forwarders in the “.” zone, disabling dnssec. Nothing works.

This is the config I have:

acl "trusted" { 192.168.0.10; 192.168.0.11; 192.168.0.0/24; };


options {
    listen-on port 53 { 127.0.0.1; 192.168.0.10; };
#   listen-on-v6 port 53 { ::1; };
    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-transfer { 192.168.0.11; };
    allow-query     { trusted; };
    forwarders  { 208.69.38.205; 8.8.4.4; }; 

    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;

    managed-keys-directory "/var/named/dynamic";

    pid-file "/run/named/named.pid";
    session-keyfile "/run/named/session.key";

    /* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
    include "/etc/crypto-policies/back-ends/bind.config";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

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

Answer

You can’t do what you’re trying to do with a recursive nameserver. Recursive servers REQUIRE the use of the root server hints, otherwise they’ll never be able to operate in a recursive manner. It sounds like what you are trying to do is set up a forwarding nameserver, which is a different configuration. For starters, you should probably set:

recursion no;

That way, any requests that aren’t satisfied by your local zones should be sent to your forwarders. In this configuration, the root hints are irrelevant.

Attribution
Source : Link , Question Author : Stijn , Answer Author : guzzijason

Leave a Comment