SlideShare a Scribd company logo
1 of 6
Download to read offline
Master DNS Configuration Linux step by
step guide RHEL 7 / Centos 7
master 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.
Master DNS configuration Linux Step by Step Guide.
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
1. Primary / Master DNS
2. Slave DNS
3. Forwarding DNS
4. Caching DNS
5. 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.
A Few DNS Records Master DNS Server RHEL 7
A = Address record
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
[root@Techtutorial ~]# yum install bind*
First start named-chroot before named.service because it will generate config files
[root@Techtutorial ~]# systemctl enable named-chroot.service
[root@Techtutorial ~]# systemctl start named-chroot.service
[root@Techtutorial ~]# systemctl enable named.service
[root@Techtutorial ~]# systemctl start named.service
[root@Techtutorial ~]# vim /var/named/chroot/etc/named.conf
options {
listen-on port 53 { 127.0.0.1; 192.168.4.128; };
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; 192.168.4.0/24; };
(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
[root@Techtutorial ~]# vim /var/named/chroot/etc/named.rfc1912.zones
### Zones Start Here ####
zone "arkit.com" IN {
type master;
file "arkit.for.zone";
allow-update { none; };
};
zone "4.168.192.in-addr.arpa" IN {
type master;
file "arkit.rev.zone";
allow-update { none; };
};
#### Zoned Ended Here ####
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
[root@Techtutorial named]# cd /var/named/chroot/var/named
[root@Techtutorial named]# cp named.localhost arkit.for.zone
[root@Techtutorial named]# cp named.loopback arkit.rev.zone
[root@Techtutorial named]# vim arkit.for.zone
$TTL 1D
@ IN SOA TechTutorial.arkit.com. root.TechTutorial.arkit.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS TechTutorial.arkit.com.
arkit.com. A 192.168.4.128
TechTutorial A 192.168.4.128
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
[root@Techtutorial named]# vim arkit.rev.zone
$TTL 1D
@ IN SOA TechTutorial.arkit.com. root.TechTutorial.arkit.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS TechTutorial.arkit.com.
128 PTR TechTutorial.arkit.com.
Note: Even do not miss single (dot) which will not start your named service
Master DNS configuration Linux Step by Step Guide
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
[root@Techtutorial named]# chown root:named arkit.for.zone
[root@Techtutorial named]# chown root:named arkit.rev.zone
Add firewall rule to communicate DNS port out
[root@Techtutorial ~]# firewall-cmd --permanent --add-service=dns
success
[root@Techtutorial ~]# firewall-cmd --reload
success
Now restart your named service.
[root@Techtutorial named]# systemctl restart named.service
[root@Techtutorial named]# systemctl status named.service
Now go to client side and add DNS server IP to /etc/resolve.conf
[root@Techtutorial named]# vim /etc/resolve.conf
search arkit.com
domain arkit.com
nameserver 192.168.4.128
verify master dns server
# nslookup arkit.com
#dig arkit.com
#host 192.168.4.128
#dig -x 192.168.4.128
That’s about installing and configuring the master DNS server.

More Related Content

What's hot

What's hot (20)

DOMAIN NAME
DOMAIN NAMEDOMAIN NAME
DOMAIN NAME
 
DNS server configuration
DNS server configurationDNS server configuration
DNS server configuration
 
Dns
DnsDns
Dns
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configuration
 
Dns server setup on ubuntu vps (master+slave)
Dns server setup on ubuntu vps (master+slave)Dns server setup on ubuntu vps (master+slave)
Dns server setup on ubuntu vps (master+slave)
 
Dns
DnsDns
Dns
 
Linux basics andng hosti
Linux basics andng hostiLinux basics andng hosti
Linux basics andng hosti
 
Dns
DnsDns
Dns
 
Dns server
Dns serverDns server
Dns server
 
Domain naming system
Domain naming systemDomain naming system
Domain naming system
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name System
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.ppt
 
DNS Records Explained @ Hackveda
DNS Records Explained @ HackvedaDNS Records Explained @ Hackveda
DNS Records Explained @ Hackveda
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Dns ppt
Dns pptDns ppt
Dns ppt
 
The History of DNS
The History of DNSThe History of DNS
The History of DNS
 
Configuring Dns
Configuring DnsConfiguring Dns
Configuring Dns
 
Build Dynamic DNS server from scratch in C (Part1)
Build Dynamic DNS server from scratch in C (Part1)Build Dynamic DNS server from scratch in C (Part1)
Build Dynamic DNS server from scratch in C (Part1)
 
BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5
 
Dns Configuration
Dns ConfigurationDns Configuration
Dns Configuration
 

Similar to Master DNS Setup Linux Guide

Similar to Master DNS Setup Linux Guide (20)

Domain Name Service
Domain Name ServiceDomain Name Service
Domain Name Service
 
Domain Name Server
Domain Name ServerDomain Name Server
Domain Name Server
 
Dns
DnsDns
Dns
 
Domain Name System DNS
Domain Name System DNSDomain Name System DNS
Domain Name System DNS
 
How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)
 
70 640
70 64070 640
70 640
 
DHCP
DHCPDHCP
DHCP
 
DNSSEC - WHAT IS IT ? INSTALL AND CONFIGURE IN CHROOT JAIL
DNSSEC - WHAT IS IT ? INSTALL AND CONFIGURE IN CHROOT JAILDNSSEC - WHAT IS IT ? INSTALL AND CONFIGURE IN CHROOT JAIL
DNSSEC - WHAT IS IT ? INSTALL AND CONFIGURE IN CHROOT JAIL
 
Session_2.ppt
Session_2.pptSession_2.ppt
Session_2.ppt
 
Zone in windows server 2012
Zone in windows server 2012Zone in windows server 2012
Zone in windows server 2012
 
6425 b 10
6425 b 106425 b 10
6425 b 10
 
Dns2
Dns2Dns2
Dns2
 
Introduction
IntroductionIntroduction
Introduction
 
Wintel
WintelWintel
Wintel
 
Pmw2 k3ni 1-2b
Pmw2 k3ni 1-2bPmw2 k3ni 1-2b
Pmw2 k3ni 1-2b
 
Dns
DnsDns
Dns
 
Dns1111111111
Dns1111111111Dns1111111111
Dns1111111111
 
Cse -306
Cse -306Cse -306
Cse -306
 
Chapter4 configuringandmanagingthednsserverrole-140520003253-phpapp01
Chapter4 configuringandmanagingthednsserverrole-140520003253-phpapp01Chapter4 configuringandmanagingthednsserverrole-140520003253-phpapp01
Chapter4 configuringandmanagingthednsserverrole-140520003253-phpapp01
 
Active Directory
Active DirectoryActive Directory
Active Directory
 

More from Md Shihab

Rhel 7 root password reset
Rhel 7 root password resetRhel 7 root password reset
Rhel 7 root password resetMd Shihab
 
RedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative worksRedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative worksMd Shihab
 
How to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOsHow to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOsMd Shihab
 
Assignment on windows firewall
Assignment on windows firewallAssignment on windows firewall
Assignment on windows firewallMd Shihab
 
Assignment on high availability(clustering)
Assignment on high availability(clustering)Assignment on high availability(clustering)
Assignment on high availability(clustering)Md Shihab
 

More from Md Shihab (13)

Samba
SambaSamba
Samba
 
Nfs
NfsNfs
Nfs
 
Maria db
Maria dbMaria db
Maria db
 
Mail
MailMail
Mail
 
Iscsi
IscsiIscsi
Iscsi
 
Dhcp
DhcpDhcp
Dhcp
 
Boot
BootBoot
Boot
 
Rhel 7 root password reset
Rhel 7 root password resetRhel 7 root password reset
Rhel 7 root password reset
 
Easy vlsm
Easy vlsmEasy vlsm
Easy vlsm
 
RedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative worksRedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative works
 
How to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOsHow to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOs
 
Assignment on windows firewall
Assignment on windows firewallAssignment on windows firewall
Assignment on windows firewall
 
Assignment on high availability(clustering)
Assignment on high availability(clustering)Assignment on high availability(clustering)
Assignment on high availability(clustering)
 

Recently uploaded

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Master DNS Setup Linux Guide

  • 1. Master DNS Configuration Linux step by step guide RHEL 7 / Centos 7 master 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. Master DNS configuration Linux Step by Step Guide. 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 1. Primary / Master DNS 2. Slave DNS 3. Forwarding DNS 4. Caching DNS 5. 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.
  • 2. 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. A Few DNS Records Master DNS Server RHEL 7
  • 3. A = Address record 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 [root@Techtutorial ~]# yum install bind* First start named-chroot before named.service because it will generate config files [root@Techtutorial ~]# systemctl enable named-chroot.service [root@Techtutorial ~]# systemctl start named-chroot.service [root@Techtutorial ~]# systemctl enable named.service [root@Techtutorial ~]# systemctl start named.service [root@Techtutorial ~]# vim /var/named/chroot/etc/named.conf options { listen-on port 53 { 127.0.0.1; 192.168.4.128; }; 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; 192.168.4.0/24; }; (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.
  • 4. Now edit zones configuration file [root@Techtutorial ~]# vim /var/named/chroot/etc/named.rfc1912.zones ### Zones Start Here #### zone "arkit.com" IN { type master; file "arkit.for.zone"; allow-update { none; }; }; zone "4.168.192.in-addr.arpa" IN { type master; file "arkit.rev.zone"; allow-update { none; }; }; #### Zoned Ended Here #### 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
  • 5. in this example named.local –> arkit.for.zone named.loopback –> arkit.rev.zone [root@Techtutorial named]# cd /var/named/chroot/var/named [root@Techtutorial named]# cp named.localhost arkit.for.zone [root@Techtutorial named]# cp named.loopback arkit.rev.zone [root@Techtutorial named]# vim arkit.for.zone $TTL 1D @ IN SOA TechTutorial.arkit.com. root.TechTutorial.arkit.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS TechTutorial.arkit.com. arkit.com. A 192.168.4.128 TechTutorial A 192.168.4.128 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 [root@Techtutorial named]# vim arkit.rev.zone $TTL 1D @ IN SOA TechTutorial.arkit.com. root.TechTutorial.arkit.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS TechTutorial.arkit.com. 128 PTR TechTutorial.arkit.com. Note: Even do not miss single (dot) which will not start your named service Master DNS configuration Linux Step by Step Guide 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
  • 6. [root@Techtutorial named]# chown root:named arkit.for.zone [root@Techtutorial named]# chown root:named arkit.rev.zone Add firewall rule to communicate DNS port out [root@Techtutorial ~]# firewall-cmd --permanent --add-service=dns success [root@Techtutorial ~]# firewall-cmd --reload success Now restart your named service. [root@Techtutorial named]# systemctl restart named.service [root@Techtutorial named]# systemctl status named.service Now go to client side and add DNS server IP to /etc/resolve.conf [root@Techtutorial named]# vim /etc/resolve.conf search arkit.com domain arkit.com nameserver 192.168.4.128 verify master dns server # nslookup arkit.com #dig arkit.com #host 192.168.4.128 #dig -x 192.168.4.128 That’s about installing and configuring the master DNS server.