Contact for queries :
 

Caching-Only DNS server

The setup of a name caching-only server is a little different from what you have done already. The first thing we mentioned before starting any configuration is that you back up the original /etc/named.conf file (RHEL6 only).

This original /etc/named.conf file is actually a sample named.conf file for name caching-only DNS servers! On RHEL01 again, make a backup of any current named.conf file:

# cp /etc/named.conf /etc/named.conf.bk

Restore the original named.conf file:

# mv /etc/named.conf.orig /etc/named.conf

Use the following as your caching-only nameserver /etc/named.conf config file:

/* General options for our caching-only name server */
options {
listen-on port 53 { 127.0.0.1; };
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; };
recursion yes;
};
/* Logging options so you know where your logs are going */
logging
{
channel default_debug {
file “data/named.run”;
severity dynamic;
};
};
/* This view statement forces cached lookups only */
zone “.” IN {
type hint;
file “named.ca”;
};
include “/etc/named.rfc1912.zones”;

Make sure to save this file as named.conf and ensure it is in the /etc/directory. For a caching-only nameserver, there is only one other file you need:

/etc/named.rfc.1912.zones (as defined in the sample file). This file should already exist by default in the /etc directory.

The named.rfc.1912.zones file looks for the named.localhost and named.loopback files created earlier. It also looks for a named.empty file, which should already exist in your /var/named directory.

Step 1. When you have everything set up, make sure that you test the config file for any errors:

# service named configtest
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700

Step 2. Now you can start the service:

# service named start
Starting named: [ OK ]

Important Note: If you set up a caching-only nameserver, you should now switch your /etc/named.conf file back to the master DNS server configuration. The rest of this chapter deals with DNS security and troubleshooting assuming that you still have the master DNS server in place.

November 16, 2015

1 responses on "Caching-Only DNS server"

Leave a Message

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

About iGURKUL

IGURKUL I.T. Training Hub offering various Career Certification courses in Computer Networking, Unix, Linux, Cloud Computing and DevOps Technologies. With its rich experience in IT training service sector, iGURKUL has been able to set Industry best practices in IT Training for the past five years.

In Past five years, more than 5000 professionals have been trained by iGURKUL for System administration, Cloud Computing and DevOps Skill set through our Online Training portal www.unixadminschool.com. And , each day , more than 10000 working professionals from all over the globe visiting our knowledge base www.unixadminschool.com/blog for the best practices and Knowledge learning.

Popular Tags

Who’s Online

Profile picture of Raja Raghava
Profile picture of Mark Joe
Profile picture of Arun S Vijayan
top
Template Design © igurkul I.T. solutions. All rights reserved.
X