[SOLVED] Random name resolution failures when using root servers directly in bind
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,334
Rep:
Random name resolution failures when using root servers directly in bind
I have my own local DNS server to resolve local domains like servers etc, and also have it setup to use root servers so I can resolve outside hosts.
Problem is, it randomly fails, it goes into this weird mode where half the internet I can't get to. Names just fail to resolve. It eventually starts working again.
I figured maybe I need to update my named.ca file, so I did by downloading the one from internic. It only made the problem worse. Some sites would not resolve AT ALL including this one. I ended up having to add the google dns servers back as forwarders just to be able to get here.
Is there a way to make it work more reliably by using root DNS? I don't like the idea of using a single forwarder as it's kind of a privacy issue, especially google, I'm sure they record all of that and sell the info to advertisers etc.
Heck, is there a way to just sync the entire domain database locally occasionally so that all name resolution is local? Bet that would speed up internet by A LOT. I'm on fibre, I find 90% of the time waiting for a page to load is DNS, as the actual data download speed is fast. If I could just store everything locally it would make things way faster. I don't imagine it would be that big, a couple hundred gigs maybe? Is this doable?
Most likely there is something wrong with your setup. Post the contents of named.conf (x-ing out keys and your static IP, of course). Also any details of your network that might be helpful.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,334
Original Poster
Rep:
Here it is, it's mostly vanilla, may have done a few changes as seen in tutorials etc... at some point.
Code:
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1; 10.1.1.5; };
#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";
allow-query { localhost; any; };
recursion yes;
dnssec-enable no;
dnssec-validation no;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
forwarders {
8.8.8.8;
8.8.4.4;
};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
include "/var/named/zones.conf";
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,334
Original Poster
Rep:
This seems to have solved itself over time, I think updating my named.ca file may have done the trick but I tried so much other stuff in the process too it may not be that. I also setup a secondary name server just to have a backup, that may possibly be helping too as if it fails on one it might automatically try the other, so it would sorta be like when I would hit refresh, but it's faster and more seamless. Just guessing though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.