SlideShare a Scribd company logo
ReversePrimary DNS for PTR type record ipv4
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 PTR record so FQDN to Ip address.
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 different Network having different Ip address Pool
"0.168.192.in-addr.arpa" :- Ip address Pool of network “192.168.0.” means write
Octet of Network in reverse order.
master :- is for Primary DNS
0.168.192.revdns :- Zone file Name (name can be any thing but for convenience use name
as Network address )
similarly create Zone for Network “100.100.10.”
➔ Now create the zone file (0.168.192.revdns and 10.100.100.revdns)
[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 0.168.192.revdns and
10.100.100.revdns (Zone file)
[root@piyush named]# cat named.localhost
[root@piyush named]# cp named.localhost 0.168.192.revdns
[root@piyush named]# cp named.localhost 10.100.100.revdns
➔ Make the owner and group of file to named
[root@piyush named]#chown named:named 0.168.192.revdns
[root@piyush named]#chown named:named 10.100.100.revdns
➔ Now editing the files according to the requirement
[root@piyush named]# vim 0.168.192.revdnss
● 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
Entry Format:- RemainingOctetOfIpAddr TTL IN Record_Type FQDN
55 :- remaining Octet of Ip Address means here last octet or host.
IN :- Internet
abc.piyush.com. :- FQDN
RECORD_TYPE
PTR :- For Ip address to FQDN conversion
CNAME :- Canonical name means here zxc.piyush.com. Points to
same Ip addresses 192.168.0.55 and 192.168.0.54
➔ Similarly for Network 100.100.10
[root@piyush named]# vim 10.100.100.revdnss
● In image :-
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 move to another pc or client to check
➔ Firstly adding nameserver as ip of DNS server.
root@piyush Desktop]#vim /etc/resolv.conf
Now do query :-
2. reverse primarydns using bind for ptr and cname record ipv4
IPv4 of Outer Domain
As we haven’t use forwarders in options section of named.conf file your DNS can’t resolve ips
whose entry are not mentioned in named.conf file.
Note:- Even if your DNS is resolving the FQDN of other ips whose entries are not in
named.conf. There are two reasons for it:-
1. It may goes to router through gateway to search the domainname of ip. You can use “ route del -net
0.0.0.0 gw 192.168.0.1 ” to delete gateway on client and DNS server side both.
2. Domainname of that ips may resides in your cache.
Now checking ip of facebook and youtube

More Related Content

What's hot (20)

PPTX
Linux networking commands
Sayed Ahmed
 
PPTX
Linux Based Network Proposal
Chris Riccio
 
PPT
Networking session-4-final by aravind.R
Navaneethan Naveen
 
PDF
Basic linux commands
Raghav Arora
 
PDF
Unix / Linux Command Reference
Sumankumar Panchal
 
PDF
Ftp server linux
Pawan Kumar
 
PDF
Termux commands-list
DhanushR24
 
PPT
Netkitmig
renyufei
 
PDF
Configuration of NTP Server on CentOS 8
Kaan Aslandağ
 
PPTX
Linux Commands
lucita cabral
 
PPTX
Linux comands for Hadoop
PM Venkatesha Babu
 
DOCX
40 basic linux command
Teja Bheemanapally
 
PDF
Unix Command-Line Cheat Sheet BTI2014
Noé Fernández-Pozo
 
PDF
How to run multiple instances of transmission daemon in linux debian or ubuntu
Aditya Gusti Tammam
 
PDF
[PDF] 2021 Termux basic commands list
nisivaasdfghj
 
DOC
Arp Dan Ipconfig Syntax
guestcc37e8c
 
PDF
DNS Configure
chacheng oo
 
PDF
FTP - File Transfer Protocol
Peter R. Egli
 
ODP
Babitha.linux
banubabitha
 
ODP
Babitha.linux
banubabitha
 
Linux networking commands
Sayed Ahmed
 
Linux Based Network Proposal
Chris Riccio
 
Networking session-4-final by aravind.R
Navaneethan Naveen
 
Basic linux commands
Raghav Arora
 
Unix / Linux Command Reference
Sumankumar Panchal
 
Ftp server linux
Pawan Kumar
 
Termux commands-list
DhanushR24
 
Netkitmig
renyufei
 
Configuration of NTP Server on CentOS 8
Kaan Aslandağ
 
Linux Commands
lucita cabral
 
Linux comands for Hadoop
PM Venkatesha Babu
 
40 basic linux command
Teja Bheemanapally
 
Unix Command-Line Cheat Sheet BTI2014
Noé Fernández-Pozo
 
How to run multiple instances of transmission daemon in linux debian or ubuntu
Aditya Gusti Tammam
 
[PDF] 2021 Termux basic commands list
nisivaasdfghj
 
Arp Dan Ipconfig Syntax
guestcc37e8c
 
DNS Configure
chacheng oo
 
FTP - File Transfer Protocol
Peter R. Egli
 
Babitha.linux
banubabitha
 
Babitha.linux
banubabitha
 

Similar to 2. reverse primarydns using bind for ptr and cname record ipv4 (20)

DOCX
DNS windows server(2008R2) & linux(SLES 11)
Tola LENG
 
PPTX
DNS,SMTP and POP3
Omar Faruk Sazib
 
PPTX
DNSPresentation.pptx
KailashTayde
 
PPT
DNS_CN_CN_____________________-_____.ppt
POOJITSAI1
 
PDF
DOMAIN NAME
Javed Ahmed
 
PDF
DNS Server Configuration
chacheng oo
 
PDF
Dhcp confg
Rincy Ranjith
 
PPTX
DNS server configuration
Sanguine_Eva
 
PPT
Linux corporate-training-in-mumbai
Unmesh Baile
 
PPT
Configuration DHCP
Tan Huynh Cong
 
PPT
Lession4 Dhcp
leminhvuong
 
PPTX
Linux networking commands
Sayed Ahmed
 
PDF
Modul server debian 5
UNISKA, SMK Telkom Banjarbaru
 
DOCX
server notes for beginners
Abhishek Maurya
 
PDF
linux_Commads
tastedone
 
PDF
Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...
Edureka!
 
PDF
Implementing DNS in Samba PDC
Jalpa Soni
 
PDF
CEH v12 Lesson 4 _ NTP, DNS _ Other Network En (1).pdf
TrungNguyn964221
 
DOCX
DNS, DHCP Configuration
Anik Saha
 
DNS windows server(2008R2) & linux(SLES 11)
Tola LENG
 
DNS,SMTP and POP3
Omar Faruk Sazib
 
DNSPresentation.pptx
KailashTayde
 
DNS_CN_CN_____________________-_____.ppt
POOJITSAI1
 
DOMAIN NAME
Javed Ahmed
 
DNS Server Configuration
chacheng oo
 
Dhcp confg
Rincy Ranjith
 
DNS server configuration
Sanguine_Eva
 
Linux corporate-training-in-mumbai
Unmesh Baile
 
Configuration DHCP
Tan Huynh Cong
 
Lession4 Dhcp
leminhvuong
 
Linux networking commands
Sayed Ahmed
 
Modul server debian 5
UNISKA, SMK Telkom Banjarbaru
 
server notes for beginners
Abhishek Maurya
 
linux_Commads
tastedone
 
Linux Administration Tutorial | Configuring A DNS Server In 10 Simple Steps |...
Edureka!
 
Implementing DNS in Samba PDC
Jalpa Soni
 
CEH v12 Lesson 4 _ NTP, DNS _ Other Network En (1).pdf
TrungNguyn964221
 
DNS, DHCP Configuration
Anik Saha
 
Ad

Recently uploaded (20)

PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Français Patch Tuesday - Juillet
Ivanti
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
Ad

2. reverse primarydns using bind for ptr and cname record ipv4

  • 1. ReversePrimary DNS for PTR type record ipv4 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 PTR record so FQDN to Ip address. 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 ● In Image :-
  • 3. 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 different Network having different Ip address Pool "0.168.192.in-addr.arpa" :- Ip address Pool of network “192.168.0.” means write Octet of Network in reverse order. master :- is for Primary DNS 0.168.192.revdns :- Zone file Name (name can be any thing but for convenience use name as Network address ) similarly create Zone for Network “100.100.10.” ➔ Now create the zone file (0.168.192.revdns and 10.100.100.revdns) [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 0.168.192.revdns and 10.100.100.revdns (Zone file) [root@piyush named]# cat named.localhost
  • 4. [root@piyush named]# cp named.localhost 0.168.192.revdns [root@piyush named]# cp named.localhost 10.100.100.revdns ➔ Make the owner and group of file to named [root@piyush named]#chown named:named 0.168.192.revdns [root@piyush named]#chown named:named 10.100.100.revdns ➔ Now editing the files according to the requirement [root@piyush named]# vim 0.168.192.revdnss ● In image :-
  • 5. 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 Entry Format:- RemainingOctetOfIpAddr TTL IN Record_Type FQDN 55 :- remaining Octet of Ip Address means here last octet or host. IN :- Internet abc.piyush.com. :- FQDN RECORD_TYPE PTR :- For Ip address to FQDN conversion CNAME :- Canonical name means here zxc.piyush.com. Points to same Ip addresses 192.168.0.55 and 192.168.0.54 ➔ Similarly for Network 100.100.10 [root@piyush named]# vim 10.100.100.revdnss ● In image :-
  • 6. 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 move to another pc or client to check ➔ Firstly adding nameserver as ip of DNS server. root@piyush Desktop]#vim /etc/resolv.conf Now do query :-
  • 8. IPv4 of Outer Domain As we haven’t use forwarders in options section of named.conf file your DNS can’t resolve ips whose entry are not mentioned in named.conf file. Note:- Even if your DNS is resolving the FQDN of other ips whose entries are not in named.conf. There are two reasons for it:- 1. It may goes to router through gateway to search the domainname of ip. You can use “ route del -net 0.0.0.0 gw 192.168.0.1 ” to delete gateway on client and DNS server side both. 2. Domainname of that ips may resides in your cache. Now checking ip of facebook and youtube