Sun 28 Sep 2008
Authoritative DNS responses for rDNS
Posted by jsupport-user1 under How ToDigg This Entry , 1 Comment
Hello,
There may come a time when your DNS server is the authoritative DNS for a client or customer that has secured an IP block from a 3rd party, perhaps for T1 or DSL service. They want to use one of the IP addresses for an email server located in their office and have asked you to setup rDNS or Reverse DNS for the IP address specified. Since the IP address did not come from your ISP you cannot ask them to setup the rDNS for you. You must accept IP delegation and configure your DNS server to give an authoritative response.
Here are 3 links that helped me figure this out:
http://www.dnsstuff.com
http://www.faqs.org/rfcs/rfc2317.html
http://www.fdcservers.net/vbulletin/archive/index.php/t-578.html
I’m going to illustrate this using 10.x.x.x IP address ranges. This setup is for Bind DNS servers. You will be creating a zone for x.x.x.x.in-addr.arpa on your DNS server.
The scenario is that the client secured a new T1 line and wanted to use IP 10.0.142.162 for an email server in their office.
On your DNS server, open a terminal window. Then edited /etc/named.conf and added this to the end:
zone “160/28.142.0.10.in-addr.arpa” {
type master;
file “/var/named/142.0.10.in-addr.arpa.db”;
};
That means that it has been added to the external view section of named.conf
I have to admit that I do not fully understand why some delegations may be looking for zone 160/28.142.0.10.in-addr.arpa and others 142.0.10.in-addr.arpa. Both can contain the IP 10.0.142.162. It may have something to do with this delegation being a /28 giving the client 16 IP addresses with 14 usable starting from 10.0.142.160.
Save your changes then create a new zone DB named /var/named/142.0.10.in-addr.arpa.db
You can do this like this:
touch /var/named/142.0.10.in-addr.arpa.db
Then open /var/named/142.0.10.in-addr.arpa.db and add:
; Zone file for 160/28.142.0.10.in-addr.arpa
$TTL 14400
@Â Â Â Â Â 86400Â Â Â INÂ Â Â Â Â SOAÂ Â Â Â ns1.yournameserver.net. support.example.com. (
2008092801Â Â Â Â Â ; serial, todays date+todays
14400Â Â Â Â Â Â Â Â Â Â ; refresh, seconds
7200Â Â Â Â Â Â Â Â Â Â Â ; retry, seconds
1209600Â Â Â Â Â Â Â Â ; expire, seconds
86400 )Â Â Â Â Â Â Â Â ; minimum, seconds
160/28.142.0.10.in-addr.arpa.        IN     84600  NS     ns1.yournameserver.net.
160/28.142.0.10.in-addr.arpa.        IN     84600  NS     ns2.yournameserver.net.
162.142.0.10.in-addr.arpa.          IN     14400  CNAME  162.160/28.142.0.10.in-addr.arpa.
162.160/28.142.0.10.in-addr.arpa.    IN     14400  PTR    mail.example.com.
Save and restart Bind. You can test your results here:
http://www.dnsstuff.com
Sincerely,
Mike
I am seaching for some idea to write in my blog… somehow come to your blog. best of luck. Eugene