SlideShare a Scribd company logo
1 of 7
Download to read offline
Primary DNS for A type record for ipv4 and ipv6
1. A primary DNS server is responsible for reading data related to the domain zone and respond to
Ip address of that Fully Qualified Domain Name (FQDN) and vice-versa means take Ip address
respond to Fully Qualified Domain Name (FQDN).
2. But here we have used A record so Ip address to FQDN.
3. Primary DNS is only One But Secondary can be multiple in numbers.
4. The connection between Client and Primary DNS is through 53/UDP port.
5. The connection between Primary DNS ans Secondary DNS is through 53/TCP port.
6. We can query for ip from primary DNS only means we can’t query from secondary DNS
7. The primary server is also responsible for communicating with the secondary server for
recovery purpose..
8. The process of a primary web server communicating with the secondary server is known as a
zone transfer, as zone data is being sent from a DNS server to another.
9. Each domain name is assigned to DNS servers for redundancy, and to simplify the process of
server administration. If a primary server already contains the zone data for a domain, this data
does not need to be replicated because the primary and secondary server continuously share
zone data.
➔ Creating Own Primary DNS on Linux using bind pakage For Rhel or CentOs
➔ Installing Software packages bind (it helps us create to primary dns)
[root@piyush Desktop]# yum install bind -y
➔ To see the confriguration file bind
[root@piyush Desktop]# rpm -qc bind
/etc/logrotate.d/named
/etc/named.conf
/etc/named.iscdlv.key
/etc/named.rfc1912.zones
/etc/named.root.key
/etc/rndc.conf
/etc/rndc.key
/etc/sysconfig/named
/var/named/named.ca
/var/named/named.empty
/var/named/named.localhost
/var/named/named.loopback
➔ Now takes backup of named.conf file as named.conf.bak
➔ named.conf looks like this
➔ [root@piyush etc]# vim named.conf
➔ Now empty the content of file.
[root@piyush etc]# echo > named.conf
Now creating the Zone for a particular domain
[root@piyush etc]# vim named.conf
● In Image :-
Note:- Ends every line in named.conf with “;”
options :- provides you option where to create zone file and Forwarder DNS
directory :- where you want to create your Zone File gives the path here
For every create Zone block
zone :- for creating zone for domain name
"piyush.com" :- domain name
master :- is for Primary DNS
mydns :- Zone file Name (name can be any thing)
➔ Now create the zone file (mydns)
[root@piyush etc]# cd /var/named/
[root@piyush named]# ls
data dynamic named.ca named.empty named.localhost named.loopback slaves
➔ Firstly copy the content of named.localhost in the file mydns (Zone file)
[root@piyush named]# cat named.localhost
[root@piyush named]# cp named.localhost mydns
➔ Make the owner and group of file to named
[root@piyush named]#chown named:named mydns
➔ Now editing the file according to the requirement
[root@piyush named]# vim mydns
● In image :-
FQDN:= Fully Qualified Domain Name hostname.domainname.topleveldomain
hostname.subdomainname.domainname.topleveldomain
Note :-
If you writing FQDN them put “.” Dot at end otherwise if you wrinting only hostname
no need to put Dot at end.
Not necessary to write TTL
@ NS :- NameServer
piyush.expert.com. :- FQDN of Domain Server
Entry Format:- FQDM TTL IN Record_Type Ip_address
abc.piyush.com. :- FQDN
qwq :- hostname ( don’t put Dot at end Dns Server will automatically append “piyush.com”
at end)
RECORD_TYPE
A :- For FQDN to Ip conversion and ipv4
AAAA :- For FQDN to Ip conversion and ipv6
CNAME :- Canonical name means here abc.piyush.com. And cba.piyush.com. Points to
same ip address 100.0.0.10
Note:-
If firewall is running add dns to firewalld service or flush the firewalld as you wish
➔ Now restart the service if no error in syntax , the service get restart without error
[root@piyush Desktop]# systemctl restart named
[root@piyush Desktop]# systemctl enable --now named
Now Time For doing Query from DNS
➔ Now move to another pc or client to check
➔ Firstly adding nameserver as ip of DNS server.
root@piyush Desktop]#vim /etc/resolv.conf
But if you use nslookup command for ipv6 normally the it will not resolve ip address.
You have write like this
DomainName for outer ipv4 and ipv6
As we haven’t use forwarders in options section of named.conf file your DNS can’t resolve domain
name whose entry are not mentioned in named.conf file.
Note:- Even if your DNS is resolving the ip of other domainname whose entries are not in
named.conf. There are two reasons for it:-
1. It may goes to router through gateway to search the ip of hostname. You can use “ route del -net
0.0.0.0 gw 192.168.0.1 ” to delete gateway.
2. Ip of that hostname may resides in your cache.

More Related Content

What's hot

How to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuHow to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuAditya Gusti Tammam
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning InfrastructurePerforce
 
Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Kaan Aslandağ
 
DNS-SD
DNS-SDDNS-SD
DNS-SDnetvis
 
Linux corporate-training-in-mumbai
Linux corporate-training-in-mumbaiLinux corporate-training-in-mumbai
Linux corporate-training-in-mumbaiUnmesh Baile
 
Ftp server linux
Ftp server linuxFtp server linux
Ftp server linuxPawan Kumar
 
Dhcp Server Linux Server
Dhcp Server Linux ServerDhcp Server Linux Server
Dhcp Server Linux Servermuh kemal
 
Bind How To
Bind How ToBind How To
Bind How Tocntlinux
 
2009 Itc Nslookup Rev01
2009 Itc Nslookup Rev012009 Itc Nslookup Rev01
2009 Itc Nslookup Rev01JayMNEA
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configurationThamizharasan P
 
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
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commandsSayed Ahmed
 
Arp Dan Ipconfig Syntax
Arp Dan Ipconfig  SyntaxArp Dan Ipconfig  Syntax
Arp Dan Ipconfig Syntaxguestcc37e8c
 
Linux Based Network Proposal
Linux Based Network ProposalLinux Based Network Proposal
Linux Based Network ProposalChris Riccio
 
DNS, DHCP Configuration
DNS, DHCP Configuration DNS, DHCP Configuration
DNS, DHCP Configuration Anik Saha
 
DHCP SERVER ( RHCE Linux)
DHCP SERVER ( RHCE Linux)DHCP SERVER ( RHCE Linux)
DHCP SERVER ( RHCE Linux)MOHSIN HASAN
 

What's hot (20)

BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5
 
How to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuHow to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntu
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure
 
7 understanding DNS
7 understanding DNS7 understanding DNS
7 understanding DNS
 
Linux Addministration
Linux AddministrationLinux Addministration
Linux Addministration
 
Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8
 
DNS-SD
DNS-SDDNS-SD
DNS-SD
 
Linux corporate-training-in-mumbai
Linux corporate-training-in-mumbaiLinux corporate-training-in-mumbai
Linux corporate-training-in-mumbai
 
Ftp server linux
Ftp server linuxFtp server linux
Ftp server linux
 
Dhcp Server Linux Server
Dhcp Server Linux ServerDhcp Server Linux Server
Dhcp Server Linux Server
 
Bind How To
Bind How ToBind How To
Bind How To
 
2009 Itc Nslookup Rev01
2009 Itc Nslookup Rev012009 Itc Nslookup Rev01
2009 Itc Nslookup Rev01
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configuration
 
Modul server debian 5
Modul server debian 5Modul server debian 5
Modul server debian 5
 
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)
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commands
 
Arp Dan Ipconfig Syntax
Arp Dan Ipconfig  SyntaxArp Dan Ipconfig  Syntax
Arp Dan Ipconfig Syntax
 
Linux Based Network Proposal
Linux Based Network ProposalLinux Based Network Proposal
Linux Based Network Proposal
 
DNS, DHCP Configuration
DNS, DHCP Configuration DNS, DHCP Configuration
DNS, DHCP Configuration
 
DHCP SERVER ( RHCE Linux)
DHCP SERVER ( RHCE Linux)DHCP SERVER ( RHCE Linux)
DHCP SERVER ( RHCE Linux)
 

Similar to 1. primary dns using bind for a and cname record for ipv4 and ipv6

DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)Tola LENG
 
Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...
Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...
Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...Edureka!
 
DNS server configuration
DNS server configurationDNS server configuration
DNS server configurationSanguine_Eva
 
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)Vijay Sharma
 
DNSPresentation.pptx
DNSPresentation.pptxDNSPresentation.pptx
DNSPresentation.pptxKailashTayde
 
Implementing DNS in Samba PDC
Implementing DNS in Samba PDCImplementing DNS in Samba PDC
Implementing DNS in Samba PDCJalpa Soni
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commandsSayed Ahmed
 
Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Kaan Aslandağ
 
Dns server
Dns serverDns server
Dns serverMuuluu
 

Similar to 1. primary dns using bind for a and cname record for ipv4 and ipv6 (20)

DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)
 
Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...
Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...
Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...
 
DNS server configuration
DNS server configurationDNS server configuration
DNS server configuration
 
main
mainmain
main
 
DNS,SMTP and POP3
DNS,SMTP and POP3DNS,SMTP and POP3
DNS,SMTP and POP3
 
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)
 
DNSPresentation.pptx
DNSPresentation.pptxDNSPresentation.pptx
DNSPresentation.pptx
 
15 Setup BIND 9
15 Setup BIND 915 Setup BIND 9
15 Setup BIND 9
 
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
 
Implementing DNS in Samba PDC
Implementing DNS in Samba PDCImplementing DNS in Samba PDC
Implementing DNS in Samba PDC
 
DOMAIN NAME
DOMAIN NAMEDOMAIN NAME
DOMAIN NAME
 
DNS SERVER
DNS SERVERDNS SERVER
DNS SERVER
 
Rhel4
Rhel4Rhel4
Rhel4
 
DNS (BIND) on CentOS
DNS (BIND) on CentOSDNS (BIND) on CentOS
DNS (BIND) on CentOS
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commands
 
Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8
 
FILE SERVER
FILE SERVERFILE SERVER
FILE SERVER
 
File Sever
File SeverFile Sever
File Sever
 
Dns server
Dns serverDns server
Dns server
 
Domain Name Service
Domain Name ServiceDomain Name Service
Domain Name Service
 

Recently uploaded

New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 

1. primary dns using bind for a and cname record for ipv4 and ipv6

  • 1. Primary DNS for A type record for ipv4 and ipv6 1. A primary DNS server is responsible for reading data related to the domain zone and respond to Ip address of that Fully Qualified Domain Name (FQDN) and vice-versa means take Ip address respond to Fully Qualified Domain Name (FQDN). 2. But here we have used A record so Ip address to FQDN. 3. Primary DNS is only One But Secondary can be multiple in numbers. 4. The connection between Client and Primary DNS is through 53/UDP port. 5. The connection between Primary DNS ans Secondary DNS is through 53/TCP port. 6. We can query for ip from primary DNS only means we can’t query from secondary DNS 7. The primary server is also responsible for communicating with the secondary server for recovery purpose.. 8. The process of a primary web server communicating with the secondary server is known as a zone transfer, as zone data is being sent from a DNS server to another. 9. Each domain name is assigned to DNS servers for redundancy, and to simplify the process of server administration. If a primary server already contains the zone data for a domain, this data does not need to be replicated because the primary and secondary server continuously share zone data. ➔ Creating Own Primary DNS on Linux using bind pakage For Rhel or CentOs ➔ Installing Software packages bind (it helps us create to primary dns) [root@piyush Desktop]# yum install bind -y
  • 2. ➔ To see the confriguration file bind [root@piyush Desktop]# rpm -qc bind /etc/logrotate.d/named /etc/named.conf /etc/named.iscdlv.key /etc/named.rfc1912.zones /etc/named.root.key /etc/rndc.conf /etc/rndc.key /etc/sysconfig/named /var/named/named.ca /var/named/named.empty /var/named/named.localhost /var/named/named.loopback ➔ Now takes backup of named.conf file as named.conf.bak ➔ named.conf looks like this ➔ [root@piyush etc]# vim named.conf ➔ Now empty the content of file. [root@piyush etc]# echo > named.conf Now creating the Zone for a particular domain [root@piyush etc]# vim named.conf
  • 3. ● In Image :- Note:- Ends every line in named.conf with “;” options :- provides you option where to create zone file and Forwarder DNS directory :- where you want to create your Zone File gives the path here For every create Zone block zone :- for creating zone for domain name "piyush.com" :- domain name master :- is for Primary DNS mydns :- Zone file Name (name can be any thing) ➔ Now create the zone file (mydns) [root@piyush etc]# cd /var/named/ [root@piyush named]# ls data dynamic named.ca named.empty named.localhost named.loopback slaves ➔ Firstly copy the content of named.localhost in the file mydns (Zone file) [root@piyush named]# cat named.localhost
  • 4. [root@piyush named]# cp named.localhost mydns ➔ Make the owner and group of file to named [root@piyush named]#chown named:named mydns ➔ Now editing the file according to the requirement [root@piyush named]# vim mydns ● In image :- FQDN:= Fully Qualified Domain Name hostname.domainname.topleveldomain hostname.subdomainname.domainname.topleveldomain Note :- If you writing FQDN them put “.” Dot at end otherwise if you wrinting only hostname no need to put Dot at end. Not necessary to write TTL @ NS :- NameServer
  • 5. piyush.expert.com. :- FQDN of Domain Server Entry Format:- FQDM TTL IN Record_Type Ip_address abc.piyush.com. :- FQDN qwq :- hostname ( don’t put Dot at end Dns Server will automatically append “piyush.com” at end) RECORD_TYPE A :- For FQDN to Ip conversion and ipv4 AAAA :- For FQDN to Ip conversion and ipv6 CNAME :- Canonical name means here abc.piyush.com. And cba.piyush.com. Points to same ip address 100.0.0.10 Note:- If firewall is running add dns to firewalld service or flush the firewalld as you wish ➔ Now restart the service if no error in syntax , the service get restart without error [root@piyush Desktop]# systemctl restart named [root@piyush Desktop]# systemctl enable --now named Now Time For doing Query from DNS ➔ Now move to another pc or client to check ➔ Firstly adding nameserver as ip of DNS server. root@piyush Desktop]#vim /etc/resolv.conf
  • 6. But if you use nslookup command for ipv6 normally the it will not resolve ip address.
  • 7. You have write like this DomainName for outer ipv4 and ipv6 As we haven’t use forwarders in options section of named.conf file your DNS can’t resolve domain name whose entry are not mentioned in named.conf file. Note:- Even if your DNS is resolving the ip of other domainname whose entries are not in named.conf. There are two reasons for it:- 1. It may goes to router through gateway to search the ip of hostname. You can use “ route del -net 0.0.0.0 gw 192.168.0.1 ” to delete gateway. 2. Ip of that hostname may resides in your cache.