Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this zone file in bind:

        $TTL 86400 IN SOA (
        )      IN      NS      IN      NS      IN      A  IN      A  IN      A  IN      A  IN      A      IN      MX      30
        ns1                   IN      A
        ns2                   IN      A

I need a reverse zone file. How do I create this, and how do I put it in named.conf?

I have a dedicated server with one assigned IP address.


IP and hostname are only for example

share|improve this question
Ask whoever assigned you that IP. Most likely, you just have to tell them what name you want that IP to map to. They may also CNAME it to a name you control. – David Schwartz Jan 3 '13 at 2:32
ip is only for example – lillolollo Jan 3 '13 at 3:02
up vote 1 down vote accepted

Using the addresses you have in the zone file above, and there are two PTR records you will be concerned with - and

IF you are delegated management of the reverse zones and zones you can declare them in your named.conf file, e.g.:

zone "" in {
  type master;
  file "3.2.1.rev";

and create zone files and populate them with PTR records, e.g.:

$TTL 2d  ; 172800 seconds
@             IN      SOA (
                              2013010304 ; serial number
                              3h         ; refresh
                              15m        ; update retry
                              3w         ; expiry
                              3h         ; nx = nxdomain ttl
              IN      NS
              IN      NS
4             IN      PTR
; etc

The problem is that as the other replies have said, unless you are delegated authority for the reverse zones by whoever has been assigned your address block by ARIN (or whichever regional internet registry controls assignments for your region) you can have your name server publish any zones you want but nobody will ever find them by following a delegation chain from the root.

Thus it's important that you understand who should be publishing the records, whether it's your responsibility or someone else's.

share|improve this answer
Yes I know, infact I change my /etc/resolve.conf to nameserver yesterday all seemd ok. site ok reverse dns ok. But today my site is unreachable to fix it I added the old dns server site ok but reverse dns no – lillolollo Jan 5 '13 at 5:05
can I use 4 IN PTR and ` 4 IN PTR`? – lillolollo Jan 5 '13 at 7:22
PTRs are not a singleton type so you can have an rrset of them with more than one value, but it is not generally a great idea because there are programs out there that expect PTRs to be singletons and don't handle them well if they are not. – Michael McNally Jan 7 '13 at 6:40
So how I can set up rzone? – lillolollo Jan 7 '13 at 23:41
I'm not sure I understand what you're asking. You create a zone master file and edit it appropriately. You declare the zone in your named.conf. You use rndc to tell the server to pick up the new zone, or you stop and restart your server. There's not much more to it than that. – Michael McNally Jan 8 '13 at 2:39

Reverse DNS lookups for IPv4 use a reversed IP address (to work within the hierarchical structure of DNS) in the zone

So to provide answers to queries against, for instance,, a DNS server should answer for

However, it's unlikely that your hosting company has delegated to your server for that address, since the smallest normal DNS parent domain that your address is in is a /24.

You may be able to contact your host and get them to delegate the /32 address to your DNS server via the method in RFC 2317, but it's simpler and more likely to be supported by your host to just have them set the record to what you want it to be.

share|improve this answer
yes but I'm still in trouble whit my reverse – lillolollo Jan 4 '13 at 0:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.