Install and Configure Caching-Only DNS Server in RHEL/CentOS 7 – Part 10

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Gabriel Cánepa

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

16 Responses

  1. Raghu says:


    After configuring DNS cache server as follows above, when I test from windows nslookup it shows as (default server : Unknown).
    rest of things are working fine.

    why it is ?

  2. Player says:


    I have a little problems in bind9.

    IN DNS service running status, First Query Time: 827 msec and Second Query Time: 1 0r 0 msec .

    After restart service or reboot the bind server, First Query Time: 827 and Second Query Time: 0 or msec.

    I want to know is previous cache is missing or not useless. and then may i know the best caching parameter

  3. x says:

    Isn’t it a open resolver now? any? means any? including localhost and all the others….

  4. Trung Ma says:

    Hello Gabriel,

    Great articles. How long DNS cached will be updated the new record.

  5. jose says:

    After creating a dns caching only server, and changing the client dns ip, when i run the yum repolist it shows the available lists, however it errors out while tying to download using the yum install option.
    Also wget fails to download. centos 7. Any suggestions on what could be the problem

  6. Manu Jain says:

    When I change the DNS server IP address at the client side, the internet stops working. I’m unable to test. Please help!!

    • @Manu Jain,
      Are you sure you have followed all the steps outlined in this guide? As you can see in the screenshots above, it should work without problems. Particularly pay attention to Step 2. You should make sure the server allows for connections from the local network, or at least from the IP of the client machine.

  7. Pang Kuo Loon says:

    How to block certain website in caching server? Manage implement in authorization named server. Kindly advise.

  8. Kay says:

    Hi, pretty good explanation. Im using a domain hoster which is pointing with an A-Record to my webserver. Do you recomment to implement a DNS caching to decrease response times?

    Thank you very much,

  9. Mouchy says:


    DNS need udp and TCP 53 open because dnsec query are ganerally larger than 512o.
    You can add dnssec support on a cache server, it’s important.

    • @Mouchy,
      Thank you for your comment. Please tell us why, in your opinion, it is important to have DNSSEC support in a cache-only DNS server. We and the rest of the community will thank you for that :).

      • Tomas says:

        DNS cache poisoning.

      • Ralph Siegler says:

        Never mind dnssec, DNS uses both tcp and udp! longer query responses will use tcp, you’ll find your udp-only solution works great most of the time then sporadically fails for queries returning long lists. Classic mistake you’ve committed there

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.