SlideShare a Scribd company logo
1 of 12
DNS Server
CONCEPT AND CONFIGURATION (UBUNTU 14.04)
1
Agenda
1. What is DNS server?
2. What is Name server?
3. What are zones – forward and reverse zone?
4. What are master dns server and slave dns server?
5. What are the DNS server records type?
6. Setup DNS server master and slave on Ubuntu 14.04 64bit VPS.
2
What is DNS server?
A dns server is a computer name resolution service which helps to recognize computers by name
over ip network.
A dns server resolves hostname to ip address and ip address to hostname.
Without a name resolution server i.e a dns server it is not possible to surf a website by its human
readable name.
A computer communicates with another computer by identify their address and understands
only ip address. Hence a dns server works as a translator between human to computer.
Some example are :
Google public dns server
8.8.8.8
8.8.4.4
3
What is Name server? 4
A Name server is actually the dns server’s name.
To host a website or to resolve an address of a computer over internet you need to register the dns name
with a domain registrar.
You also need to register your dns server as name server to your domain registrar.
After the above two steps you need to configure DNS server as per name server registered and then you
can create record to your own dns server.
At least minimum two name servers required to register ( can have same wan IP)
Example :
Domain registrar : godaddy , bigrock, znetlive etc.
I purchase a domain name mevijay.in from bigrock.
I have two Ubuntu VPS having ip 158.85.163.100 & 158.85.163.103 hence I register both vps as name
server ns1.mevijay.in & ns2.mevijay.in
I also updated ns records from domain registrar to use as my vps ns1.mevijay.in and ns2.mevijay.in
So all the name resolution query will be forwarded to my dns server (name server) from my domain
registrar.
What are zones? 5
DNS server has two types of zones
1. forward zone
2. reverse zone
A forward zone resolves host name into ip address and holds record types – A , NS, MX, CNAME,
AAA, SPF.
A reverse zone resolves ip address to hostname and holds only PTR record type. If I need to
know an ip address is belongs to which hostname or dns name then it can be lookup by reverse
zone. Reverse zone is mandatory for mail server. If you have a mail server then a PTR records
corresponding to mail servers hostname must be entered as wel as mx record and A record also
must be entered in forward zone.
DNS server Types: 6
Two types of dns server mainly used.
1. Primary or master dns server
2. secondary or slave dns server
Master dns server is nothing but as its name it’s a master name server and holds both zone and
records.
Slave dns server works as secondary dns server and sync with master dns server for records. So
you do not need to update a slave dns server records and can simply restart the service when
a master dns server records got updated.
DNS server record types: 7
A DNS server consists two zones forward and reverse, depending upon the zone we have
following main record types-
Forward zone records:-
A
MX
NS
CNAME
Reverse zone record:-
PTR
Understanding forward zone records: 8
A record:-
an A record resolves hostname to ip address and is main record type to recognize a computer or
website by its name.
e.g. mail IN A 192.168.1.108
MX record:-
mx record is used to point a host name as mail exchanger server i.e. mail server. This record used to
tell network that pointed hostname is a mail server of domain.
e.g. @ IN MX 10 mail.mevijay.in.
Above example telling you that mail.mevijay.in A record or hostname is the mail server for domain
mevijay.in having mail priority 10.
NS record:-
ns record is used to point for your dns server (name server)address and is usually dns server itself.
e.g. @ IN NS ns1.mevijay.in.
Above example shows @ symbol which means zone i.e. mevijay.in for my case having name server is
ns1.mevijay.in
CNAME record:-
This also knows as alias of a domain name. perhaps it is quite easy to understand for a website that
opens with www and without. So we create a cname record of domain as www and it points on the
same hostname or same ip whether we use with www or not.
e.g. www IN CNAME mevijay.in.
Setup master dns server:- 9
# apt-get update
# apt-get install bind9 dnsutils –y
# cd /etc/bind
# mkdir zones ( to hold all zone records files)
# vim named.conf.default-zones
Remove all the lines and make changes like bellow
10
Save file and exit.
# cp db.local zones/mevijay.in
# vim zones/mevijay.in
Make changes for your domain and enter required records example in bellow snap. Save and exit
# service bind9 restart
Setup slave dns server:- 11
# apt-get update
# apt-get install bind9 dnsutils –y
# cd /etc/bind
# mkdir zones ( to hold all zone records files)
# vim named.conf.default-zones
Remove all the lines and make changes like bellow. Here we have given ip of our master server to sync
records.
# touch zones/mevijay.in
# service bind9 restart
Thank you!
VIJAY SHARMA
MAIL: SHARMAVIJAY86@GMAIL.COM
12

More Related Content

What's hot

Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)Jaime Barragan
 
OS Lab: Introduction to Linux
OS Lab: Introduction to LinuxOS Lab: Introduction to Linux
OS Lab: Introduction to LinuxMotaz Saad
 
제3회난공불락 오픈소스 인프라세미나 - Pacemaker
제3회난공불락 오픈소스 인프라세미나 - Pacemaker제3회난공불락 오픈소스 인프라세미나 - Pacemaker
제3회난공불락 오픈소스 인프라세미나 - PacemakerTommy Lee
 
Introduction to Haproxy
Introduction to HaproxyIntroduction to Haproxy
Introduction to HaproxyShaopeng He
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1Lilesh Pathe
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellSalaudeen Rajack
 
OpenSCAP Overview(security scanning for docker image and container)
OpenSCAP Overview(security scanning for docker image and container)OpenSCAP Overview(security scanning for docker image and container)
OpenSCAP Overview(security scanning for docker image and container)Jooho Lee
 
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya JyothiIntroduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya JyothiSowmya Jyothi
 
A Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationA Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationAvinash Kumar
 
Chapter01 Introduction To Windows Server 2003
Chapter01     Introduction To  Windows  Server 2003Chapter01     Introduction To  Windows  Server 2003
Chapter01 Introduction To Windows Server 2003Raja Waseem Akhtar
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name SystemPeter R. Egli
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
July OpenNTF Webinar - HCL Presents Keep, a new API for Domino
July OpenNTF Webinar - HCL Presents Keep, a new API for DominoJuly OpenNTF Webinar - HCL Presents Keep, a new API for Domino
July OpenNTF Webinar - HCL Presents Keep, a new API for DominoHoward Greenberg
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commandsSagar Kumar
 

What's hot (20)

Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Ansible Automation - Enterprise Use Cases | Juncheng Anthony LinAnsible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
 
Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
TỰ HỌC LPI 1
TỰ HỌC LPI 1 TỰ HỌC LPI 1
TỰ HỌC LPI 1
 
OS Lab: Introduction to Linux
OS Lab: Introduction to LinuxOS Lab: Introduction to Linux
OS Lab: Introduction to Linux
 
제3회난공불락 오픈소스 인프라세미나 - Pacemaker
제3회난공불락 오픈소스 인프라세미나 - Pacemaker제3회난공불락 오픈소스 인프라세미나 - Pacemaker
제3회난공불락 오픈소스 인프라세미나 - Pacemaker
 
Filepermissions in linux
Filepermissions in linuxFilepermissions in linux
Filepermissions in linux
 
Introduction to Haproxy
Introduction to HaproxyIntroduction to Haproxy
Introduction to Haproxy
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
 
La plateforme JEE
La plateforme JEELa plateforme JEE
La plateforme JEE
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
OpenSCAP Overview(security scanning for docker image and container)
OpenSCAP Overview(security scanning for docker image and container)OpenSCAP Overview(security scanning for docker image and container)
OpenSCAP Overview(security scanning for docker image and container)
 
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya JyothiIntroduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
 
A Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationA Project Report on Linux Server Administration
A Project Report on Linux Server Administration
 
Chapter01 Introduction To Windows Server 2003
Chapter01     Introduction To  Windows  Server 2003Chapter01     Introduction To  Windows  Server 2003
Chapter01 Introduction To Windows Server 2003
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name System
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
July OpenNTF Webinar - HCL Presents Keep, a new API for Domino
July OpenNTF Webinar - HCL Presents Keep, a new API for DominoJuly OpenNTF Webinar - HCL Presents Keep, a new API for Domino
July OpenNTF Webinar - HCL Presents Keep, a new API for Domino
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 

Similar to Dns server setup on ubuntu vps (master+slave)

Dns server
Dns serverDns server
Dns serverMuuluu
 
Dns server slide(h.m_merajul_hasan)
Dns server slide(h.m_merajul_hasan)Dns server slide(h.m_merajul_hasan)
Dns server slide(h.m_merajul_hasan)Merajulhasanraj
 
DNS and Troubleshooting DNS issues in Linux
DNS and Troubleshooting DNS issues in LinuxDNS and Troubleshooting DNS issues in Linux
DNS and Troubleshooting DNS issues in LinuxKonkona Basu
 
1. primary dns using bind for a and cname record for ipv4 and ipv6
1. primary dns using bind for a and cname record for ipv4 and ipv61. primary dns using bind for a and cname record for ipv4 and ipv6
1. primary dns using bind for a and cname record for ipv4 and ipv6Piyush Kumar
 
How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)Amandeep Kaur
 
DNS server configuration
DNS server configurationDNS server configuration
DNS server configurationSanguine_Eva
 
Nameserver: What Is It And What Does It Do?
Nameserver: What Is It And What Does It Do?Nameserver: What Is It And What Does It Do?
Nameserver: What Is It And What Does It Do?Host It Smart
 
DNSPresentation.pptx
DNSPresentation.pptxDNSPresentation.pptx
DNSPresentation.pptxKailashTayde
 
Session 4 Tp 4
Session 4 Tp 4Session 4 Tp 4
Session 4 Tp 4githe26200
 
Zone in windows server 2012
Zone in windows server 2012Zone in windows server 2012
Zone in windows server 2012devil00dante
 

Similar to Dns server setup on ubuntu vps (master+slave) (20)

Linux basics andng hosti
Linux basics andng hostiLinux basics andng hosti
Linux basics andng hosti
 
SFScon 22 - Dashamir Hoxha - Manage your own DNS.pdf
SFScon 22 - Dashamir Hoxha - Manage your own DNS.pdfSFScon 22 - Dashamir Hoxha - Manage your own DNS.pdf
SFScon 22 - Dashamir Hoxha - Manage your own DNS.pdf
 
Dns
DnsDns
Dns
 
Dns server
Dns serverDns server
Dns server
 
Dns server slide(h.m_merajul_hasan)
Dns server slide(h.m_merajul_hasan)Dns server slide(h.m_merajul_hasan)
Dns server slide(h.m_merajul_hasan)
 
Domain Name Service
Domain Name ServiceDomain Name Service
Domain Name Service
 
Dns
DnsDns
Dns
 
DNS and Troubleshooting DNS issues in Linux
DNS and Troubleshooting DNS issues in LinuxDNS and Troubleshooting DNS issues in Linux
DNS and Troubleshooting DNS issues in Linux
 
DNS.docx
DNS.docxDNS.docx
DNS.docx
 
7 understanding DNS
7 understanding DNS7 understanding DNS
7 understanding DNS
 
1. primary dns using bind for a and cname record for ipv4 and ipv6
1. primary dns using bind for a and cname record for ipv4 and ipv61. primary dns using bind for a and cname record for ipv4 and ipv6
1. primary dns using bind for a and cname record for ipv4 and ipv6
 
How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)
 
DNS server configuration
DNS server configurationDNS server configuration
DNS server configuration
 
Nameserver: What Is It And What Does It Do?
Nameserver: What Is It And What Does It Do?Nameserver: What Is It And What Does It Do?
Nameserver: What Is It And What Does It Do?
 
Dns1111111111
Dns1111111111Dns1111111111
Dns1111111111
 
DNSPresentation.pptx
DNSPresentation.pptxDNSPresentation.pptx
DNSPresentation.pptx
 
Dns interview
Dns interviewDns interview
Dns interview
 
DomainNameSystem
DomainNameSystemDomainNameSystem
DomainNameSystem
 
Session 4 Tp 4
Session 4 Tp 4Session 4 Tp 4
Session 4 Tp 4
 
Zone in windows server 2012
Zone in windows server 2012Zone in windows server 2012
Zone in windows server 2012
 

Recently uploaded

home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...Amil Baba Dawood bangali
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 

Recently uploaded (20)

home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 

Dns server setup on ubuntu vps (master+slave)

  • 1. DNS Server CONCEPT AND CONFIGURATION (UBUNTU 14.04) 1
  • 2. Agenda 1. What is DNS server? 2. What is Name server? 3. What are zones – forward and reverse zone? 4. What are master dns server and slave dns server? 5. What are the DNS server records type? 6. Setup DNS server master and slave on Ubuntu 14.04 64bit VPS. 2
  • 3. What is DNS server? A dns server is a computer name resolution service which helps to recognize computers by name over ip network. A dns server resolves hostname to ip address and ip address to hostname. Without a name resolution server i.e a dns server it is not possible to surf a website by its human readable name. A computer communicates with another computer by identify their address and understands only ip address. Hence a dns server works as a translator between human to computer. Some example are : Google public dns server 8.8.8.8 8.8.4.4 3
  • 4. What is Name server? 4 A Name server is actually the dns server’s name. To host a website or to resolve an address of a computer over internet you need to register the dns name with a domain registrar. You also need to register your dns server as name server to your domain registrar. After the above two steps you need to configure DNS server as per name server registered and then you can create record to your own dns server. At least minimum two name servers required to register ( can have same wan IP) Example : Domain registrar : godaddy , bigrock, znetlive etc. I purchase a domain name mevijay.in from bigrock. I have two Ubuntu VPS having ip 158.85.163.100 & 158.85.163.103 hence I register both vps as name server ns1.mevijay.in & ns2.mevijay.in I also updated ns records from domain registrar to use as my vps ns1.mevijay.in and ns2.mevijay.in So all the name resolution query will be forwarded to my dns server (name server) from my domain registrar.
  • 5. What are zones? 5 DNS server has two types of zones 1. forward zone 2. reverse zone A forward zone resolves host name into ip address and holds record types – A , NS, MX, CNAME, AAA, SPF. A reverse zone resolves ip address to hostname and holds only PTR record type. If I need to know an ip address is belongs to which hostname or dns name then it can be lookup by reverse zone. Reverse zone is mandatory for mail server. If you have a mail server then a PTR records corresponding to mail servers hostname must be entered as wel as mx record and A record also must be entered in forward zone.
  • 6. DNS server Types: 6 Two types of dns server mainly used. 1. Primary or master dns server 2. secondary or slave dns server Master dns server is nothing but as its name it’s a master name server and holds both zone and records. Slave dns server works as secondary dns server and sync with master dns server for records. So you do not need to update a slave dns server records and can simply restart the service when a master dns server records got updated.
  • 7. DNS server record types: 7 A DNS server consists two zones forward and reverse, depending upon the zone we have following main record types- Forward zone records:- A MX NS CNAME Reverse zone record:- PTR
  • 8. Understanding forward zone records: 8 A record:- an A record resolves hostname to ip address and is main record type to recognize a computer or website by its name. e.g. mail IN A 192.168.1.108 MX record:- mx record is used to point a host name as mail exchanger server i.e. mail server. This record used to tell network that pointed hostname is a mail server of domain. e.g. @ IN MX 10 mail.mevijay.in. Above example telling you that mail.mevijay.in A record or hostname is the mail server for domain mevijay.in having mail priority 10. NS record:- ns record is used to point for your dns server (name server)address and is usually dns server itself. e.g. @ IN NS ns1.mevijay.in. Above example shows @ symbol which means zone i.e. mevijay.in for my case having name server is ns1.mevijay.in CNAME record:- This also knows as alias of a domain name. perhaps it is quite easy to understand for a website that opens with www and without. So we create a cname record of domain as www and it points on the same hostname or same ip whether we use with www or not. e.g. www IN CNAME mevijay.in.
  • 9. Setup master dns server:- 9 # apt-get update # apt-get install bind9 dnsutils –y # cd /etc/bind # mkdir zones ( to hold all zone records files) # vim named.conf.default-zones Remove all the lines and make changes like bellow
  • 10. 10 Save file and exit. # cp db.local zones/mevijay.in # vim zones/mevijay.in Make changes for your domain and enter required records example in bellow snap. Save and exit # service bind9 restart
  • 11. Setup slave dns server:- 11 # apt-get update # apt-get install bind9 dnsutils –y # cd /etc/bind # mkdir zones ( to hold all zone records files) # vim named.conf.default-zones Remove all the lines and make changes like bellow. Here we have given ip of our master server to sync records. # touch zones/mevijay.in # service bind9 restart
  • 12. Thank you! VIJAY SHARMA MAIL: SHARMAVIJAY86@GMAIL.COM 12