{"id":8740,"date":"2023-03-29T20:38:49","date_gmt":"2023-03-29T20:38:49","guid":{"rendered":"https:\/\/www.geekdecoder.com\/?p=8740"},"modified":"2023-03-29T20:38:49","modified_gmt":"2023-03-29T20:38:49","slug":"determining-an-ip-address-authoritative-nameserver-for-ptr-records","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2023\/03\/29\/determining-an-ip-address-authoritative-nameserver-for-ptr-records\/","title":{"rendered":"Determining an IP Address&#8217; Authoritative Nameserver for PTR Records"},"content":{"rendered":"\n<p>An authoritative nameserver is a DNS (Domain Name System) server that contains the original source of information for a particular domain name. This server is considered as the ultimate or official source of DNS information for the domain and is responsible for providing the correct IP address or other DNS record information associated with the domain. When a DNS query is made for a domain name, the authoritative nameserver for that domain is queried to obtain the corresponding DNS information.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>To determine what the current authoritative nameserver is, you\u2019ll first need to understand how a standard PTR zone for an IP block will appear.<\/p>\n\n\n\n<p>The zone will be formatted with the first three octets (an octet being one \u2018section\u2019 of the typical, 4-piece IP address) of the IP address, reversed, then followed by in-addr.arpa. Let\u2019s look at some examples. <\/p>\n\n\n\n<p>Server&#8217;s IP Address: 57.256.58.21<\/p>\n\n\n\n<p>Associated PTR Zone: 58.256.57.in-addr.arpa<\/p>\n\n\n\n<p>Server&#8217;s IP Address: 204.11.256.40<\/p>\n\n\n\n<p>Associated PTR Zone: 256.11.204.in-addr.arpa<\/p>\n\n\n\n<p>So what this establishes is that there will be a separate reverse DNS\/PTR zone for each block of IP addresses (typically \/24, or 255.255.255.0, for anyone familiar with subnet masks).<\/p>\n\n\n\n<p>Within these zones, the individual PTR records are entered per individual IP address as simply the last, missing octet. So for the first example, a PTR record would be created in the corresponding 58.256.57.in-addr.arpa zone with just \u201c30\u201d, and of course the hostname that it needs to resolve to. The second example would add \u201c21\u201d, and so on.<\/p>\n\n\n\n<p>Knowing how these zones are formatted, one way to determine the authoritative nameservers for an IP address is to use the dig command-line utility. If this is not installed already, you can do so on the cPanel server via yum by running:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nyum -y install bind-utils\n<\/pre><\/div>\n\n\n<p>To install Dig on Debian or Ubuntu:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo apt-get install dnsutils\n<\/pre><\/div>\n\n\n<p>To find these nameservers using dig, you would run a command like the following:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ndig +nssearch 125.74.208.in-addr.arpa\n<\/pre><\/div>\n\n\n<p>Which might give you results that look something like the following:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nSOA c.cpanel.net. dns.cpanel.net. 2020080500 28808 7200 3600000 86400 from server 208.74.121.52 in 42 ms.\nSOA c.cpanel.net. dns.cpanel.net. 2020080500 28808 7200 3600000 86400 from server 208.74.123.178 in 43 ms.\nSOA c.cpanel.net. dns.cpanel.net. 2020080500 28808 7200 3600000 86400 from server 208.74.121.57 in 43 ms.\n<\/pre><\/div>\n\n\n<p>This tells us that the servers 208.74.121.52, 208.74.125.58 and  208.74.121.57 are authoritative for those IPs.<\/p>\n\n\n\n<p>So if you have an IP address, remember to reverse the first 3 octets of the IP address you\u2019d like to query.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An authoritative nameserver is a DNS (Domain Name System) server that contains the original source of information for a particular domain name. This server is considered as the ultimate or official source of DNS information for the domain and is responsible for providing the correct IP address or other DNS record information associated with the &#8230; <a title=\"Determining an IP Address&#8217; Authoritative Nameserver for PTR Records\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2023\/03\/29\/determining-an-ip-address-authoritative-nameserver-for-ptr-records\/\" aria-label=\"Read more about Determining an IP Address&#8217; Authoritative Nameserver for PTR Records\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[],"class_list":["post-8740","post","type-post","status-publish","format-standard","hentry","category-kb"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=8740"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8740\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=8740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=8740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=8740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}