Master dns configuration step by step guide RHEL7 / Centos 7
DNS, Domain name system. DNS major role is to convert human readable domain names to machine known numbers (IP Address). World resource connected to the internet or a private network by decentralized naming system.
The Domain Name System delegates the responsibility of assigning domain names and mapping those names to Internet resources by designating authoritative name servers for each domain. Network administrators may delegate authority over sub-domains of their allocated name space to other name servers. This mechanism provides distributed and fault tolerant service and was designed to avoid a single large central database.
Based on working method types of DNS are there, few are mentioned below
- Primary / Master DNS
- Slave DNS
- Forwarding DNS
- Caching DNS
- Authoritative-Only DNS
Primary / master DNS and Slave DNS Servers
Given the importance of DNS in making services and entire networks accessible, most DNS servers that are authoritative for a zone will have built-in redundancy. There are various terms for the relationships between these servers, but generally, a server can either be a master or a slave in its configuration.
Both master and slave servers are authoritative for the zones they handle. The master does not have any more power over the zones than the slave. The only differentiating factor between a master and a slave server is where they read their zone files from.
A master server reads its zone files from files on the system’s disk. These are usually where the zone administrator adds, edits, or transfers the original zone files.
The slave server receives the zones that it is authoritative for through a zone transfer from one of the master servers for the zone. Once it has these zones, it places them in a cache. If it has to restart, it first checks its cache to see if the zones inside are up-to-date. If not, it requests the updated information from the master server.
Forwarding DNS Server
This approach adds an additional link in the chain of DNS resolution by implementing a forwarding server that simply passes all requests to another DNS server with recursive capabilities (such as a caching DNS server).
The advantage of this system is that it can give you the advantage of a locally accessible cache while not having to do the recursive work (which can result in additional network traffic and can take up substantial resources on high traffic servers). This can also lead to some interesting flexibility in splitting your private and public traffic by forwarding to different servers.
Caching DNS Server
A caching DNS server is a server that handles recursive requests from clients. Almost every DNS server that the operating system’s stub resolver will contact will be a caching DNS server.
Caching servers have the advantage of answering recursive requests from clients. While authoritative-only servers may be ideal for serving specific zone information, caching DNS servers are more broadly useful from a client’s perspective. They make the DNS system of the world accessible to rather dumb client interfaces.
Authoritative-Only DNS Server
An authoritative-only DNS server is a server that only concerns itself with answering the queries for the zones that it is responsible for. Since it does not help resolve queries for outside zones, it is generally very fast and can handle many requests efficiently.
Few DNS Records
A = Address record
PTR = Pointer record
NS = Name service / server
MX = Mail Exchanger
SOA = State of Authority
CNAME = Canonical name / Alias Name
PTR = Pointer record
NS = Name service / server
MX = Mail Exchanger
SOA = State of Authority
CNAME = Canonical name / Alias Name
master DNS Server Profile
Packages Required : bind*
Version : 9
Daemon : named
Config File : /var/named/chroot/etc/named.conf
/var/named/chroot/etc/named.rfc1912.zone
Default zone files location : /var/named/chroot/var/named/
Port Number : 53
First start named-chroot before named.service because it will generate config files
(Default line number is 10-17) As shown above enter your DNS server IP address (which is your server address) and network address which network you want to provide DNS service.
Now edit zones configuration file
as shown above copy the zone configuration lines (Default line numbers from 19 to 23) and paste there itself. copy the Reverse zone configuration line (Default line number 31 to 35) and paste there itself. Now modify the copied lines as per your requirement ( which are in pink color).
zone “arkit.com” IN { in this line whatever the domain name you would like to configure mention that
file “arkit.for.zone”; file name whatever the file name you want you can give
zone “4.168.192.in-addr.arpa” IN { in this line write your IP address in reverse way
file “arkit.rev.zone”; file name whatever the file name you would like.
Save configuration file and Exit
Creating Zone files
Forward lookup zone – forward lookup zone will convert host name name to IP address
Reverse lookup zone – reverse lookup zone will convert IP address to host name
change directory path to /var/named/chroot/var/named/
copy the files as per the file names which we have mentioned in above zones configuration file
in this example
named.local –> arkit.for.zone
named.loopback –> arkit.rev.zone
As shown in above configuration TechTutorial.arkit.com. – DNS Server Name and domain name
add NS record as DNS Server name and domain name (do not forgot to add (dot) yet end)
First A record will be your domain name and DNS server IP address
Note: Even do not miss single (dot) which will not start your named service
i have shown single host record as a example if you want to add more records add them
Now change the ownership of created files to named group
Add firewall rule to communicate DNS port out
Now restart your named service.
Now go to client side and add DNS server IP to /etc/resolve.conf
verify master dns server
That’s about installing and configuring the master DNS server.
No comments:
Post a Comment