Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this zone file in bind:

        $TTL 86400
        mysite.net. IN SOA ns1.mysite.net. admin.mysite.net. (
        2006012008
        86400
        3600
        604800
        86400
        )
        mysite.net.      IN      NS      ns1.mysite.net.
        mysite.net.      IN      NS      ns2.mysite.net.
        mysite.net.      IN      A       1.2.3.4
        www.mysite.net.  IN      A       1.2.3.4
        mail.mysite.net.  IN      A      1.2.3.4
        newsite.mysite.net.  IN      A      1.2.3.4
        shop.mysite.net.  IN      A       101.102.103.104
        mysite.net.      IN      MX      30 mail.mysite.net.
        ns1                   IN      A      1.2.3.4
        ns2                   IN      A      1.2.3.4

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.

EDIT

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

2 Answers 2

up vote 0 down vote accepted

Using the addresses you have in the zone file above, 1.2.3.4 and 101.102.103.104 there are two PTR records you will be concerned with - 4.3.2.1.in-addr.arpa and 104.103.102.101.in-addr.arpa.

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

zone "3.2.1.in-addr.arpa" in {
  type master;
  file "3.2.1.rev";
};

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

$TTL 2d  ; 172800 seconds
$ORIGIN 3.2.1.IN-ADDR.ARPA.
@             IN      SOA   ns1.example.com. hostmaster.example.com. (
                              2013010304 ; serial number
                              3h         ; refresh
                              15m        ; update retry
                              3w         ; expiry
                              3h         ; nx = nxdomain ttl
                              )
              IN      NS      ns1.example.com.
              IN      NS      ns2.example.com.
4             IN      PTR     mysite.net.
; 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 127.0.0.1 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 mysite.net. and ` 4 IN PTR mail.mysite.net.`? –  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 in-addr.arpa.

So to provide answers to queries against, for instance, 192.0.2.0, a DNS server should answer for 0.2.0.192.in-addr.arpa.

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

 
discard

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.