RHCE exam objectives - DNS services
Types of DNS server
- A master DNS server, authoritative for one or more domains, includes host records for that domain
- A slave DNS server, which relies on a master DNS server for data, can be used in place of that master DNS server.
- A caching-only DNS server stores recent requests like a proxy server. If configured with forwarding features, it refers to other DNS servers for requests not in its current cache.
- A forwarding only DNS server refers all requests to other DNS servers
Installation:
#yum install bind bind-chroot bind-devel bind-utils
Configure caching only name server
The default version of /etc/named.conf is set up for a caching-only nameserver, limited to localhost system. Minor changes are required to open that server up to a local network. The default named.conf file is shown below.
To extend caching-only nameserver to local network edit the following directives,
listen-on port 53 { 127.0.0.1; 192.168.122.0/24; };
allow-query { localhost; 192.168.122.0/24; };
save the file and start service
#/etc/init.d/named start
#chkconfig named on
Forwarding nameserver
It’s simple and straightforward configuration.
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
forward only;
forwarders {
192.68.122.1;
192.168.0.1;
};
};
Caching-only nameserver to forward DNS queries
Requests not in the local cache would be forwarded to the name servers specified with the forwarders directive. Here is an example for forwarding DNS queries,
options {
listen-on port 53 { 127.0.0.1; 192.168.122.0/24; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
forward only;
forwarders {
192.68.122.1;
192.168.0.1;
};
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; 192.168.0.0/24; };
recursion yes;
};
#rndc flush --flush DNS query cache
#rndc status --show the running DNS server status
Download As PDF