-2

How to create a RDNS (Reverse DNS) in centos or Ubuntu [PTR record]

I searched a lot in Internet and didn't find any solutions. I got a idea it can be done by BIND or BIND9.

In some forum i seen some peoples wrote "RDNS cannot created by user, it can only created by Server provider or server manager" - Is it True.

I tried my best all possible way but failed, Can anyone provide me a procedure or idea to create RDNS.

Example

Example.com - xxx.xxx.xxx.xx0
Example.xyz - xxx.xxx.xxx.xx1
xyz.example.com - xxx.xxx.xxx.xx2

Thanks you.

  • 1
    RDNS can be created only by your ISP. That's true. – Anubioz Apr 14 '16 at 22:31
  • That's not quite true. I have, for example, one network in which I own the whole block of IPs, so I am officially the PTR record holder. You have to have an arrangement with your upstream provider. Basically they have to be willing to "forward" your DNS server PTR records. Although most nowadays have an external facility/API to manage this so that you don't accidentally claim IPs you're not entitled to, particularly if you share the IP block with others. – tudor -Reinstate Monica- Apr 15 '16 at 03:43

1 Answers1

3

Well... not so sure if this is the answer but basically, you only need a PTR record on your domain.reverse.conf file that would look like this:

5   IN  PTR    www.example.com.

and on named.conf:

zone "0.168.192.in-addr.arpa" IN {
    type master;   
    file "domain.reverse.conf";   
};

Basically, that would asign a PTR record for 192.168.0.5 to www.example.com

As @tudor mentioned, in a real scenario, you would need to talk firstly with your service provider, as you are not the owner of a block of IPs (in most cases) but on a local environment, it will work.

sysfiend
  • 1,327
  • 1
  • 11
  • 24