Friday, April 25, 2014

Cache only DNS server

        DNS [Domain Name Server] - Caching only

- DNS is used for IP to host and host to IP resolution
- It works on TCP/IP port no.53
- Package name         - bind          [berkley Internet name domain]
- Service name         - named
- Configuration file     -
    - /etc/named.conf
    - /etc/named.rfc/1912zones
    - /var/named/named.loopback
    - /var/named/named.localhost


        Types of DNS server

a.)    Master            [Primary in windows]
b.)    Slave            [Secondary in windows]
c.)    Caching only        [Forwarder in windors]

Forward Lookup Zone  :- Name to IP resolution
Backward Lookup Zone :- IP to Name resolution

Recursive Query :  When the DNS query is resolved using forwarder

==================================================
DNS Caching will store locally all the successful DNS query sent to another DNS server
==================================================

        How to Configure

1.    Setup the IP manually,gateway, DNS (own IP address)
2.    Enter the DNS IP in your local LAN enviroment [in client]

Server side :

# yum install bind -y
# vim /etc/named.conf
  Listen on [any;];                // 10-11th line
  allow query [localhost;any;];
  recursion yes;
  forwarders {Main DNS server IP}   OR        // Ex:- IP address provided from Airtel broadband
  forwarders {Main DNS server I;8.8.8.8}       //8.8.8.8 = Google IP address
  :wq
# service named restart
# chkconf named on
# rndc dumpd                    // To create caching database


To View Database :
# cd /var/named/data

File name :- cache_dump.db 

----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------

No comments:

Post a Comment