[HOWTO] Sub Class C Subnet Reverse DNS – Bind9

Print this post Email this post

Having your ISP delegating the reverse DNS maybe a YMMV scenario. Some will allow you and others will not. If your ISP does allow you to host your own reverse DNS you have to create a zone file for the reverse DNS entry. This is a very easy thing to do if you have a class C subnet, but anything smaller than that or with different IP ranges, it gets complicated. Here’s what they usually have to do on their end, and what you need to do on your end.

ISP end
assuming the class C is 216.237.21.0/24 and the subnet you own is 216.237.21.64/26):
21.237.216.in-addr.arpa [SOA Entries]
21.237.216.in-addr.arpa [NS Servers]

;someone else's entry
$GENERATE 1-63 $ IN PTR 216-237-21-$.orng.nextweb.net.

;start of your entry
64-127 IN NS ns1.mydomain.net.
64-127 IN NS ns2.mydomain.net.
$GENERATE 64-127 $ CNAME $.64-127

;someone else's entry
$GENERATE 128-255 $ IN PTR 216-237-21-$.orng.nextweb.net.

Client Side
Create the following zone “64-255.21.237.216.in-addr.arpa” with the following entry:

$TTL 86400
@ IN SOA [SOA Entries]
@ IN NS [NS Servers]
65 IN PTR gateway.mydomain.net.
66 IN PTR mail.mydomain.net.
67 IN PTR dns.mydomain.net.

$GENERATE 68-126 $ IN PTR $.dhcp.mydomain.net.
Short explanation of $GENERATE:
$GENERATE 68-70 $ IN PTR $.dhcp.mydomain.net.
is equivalent to:
68 IN PTR 68.dhcp.mydomain.net.
69 IN PTR 69.dhcp.mydomain.net.
70 IN PTR 70.dhcp.mydomain.net.

Be Sociable, Share!

Tags: , ,

Leave a Reply

You must be logged in to post a comment.