BIND: one forward, multiple reverse?

11,552

Solution 1

You do not need to worry about subnets when it comes to the reverse domain lookup. You should setup your files in a way that makes sense for you. Are you going to have many machines? Can you put them all in one file? If that is the case, simply let the reverse lookup 10.20.. addresses and then list the addresses in this file.

[named.conf.local]

zone "20.10.in-addr.arpa" {
    type master;
    file "/etc/bind/db.10.20";
    allow-query { internal; };
};

[db.10.20]

$ORIGIN 20.10.in-addr.arpa.
$TTL 1W
@                       1D IN SOA       bob.com. root.bob.com. (
                                        2011020501      ; serial
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

                        1D IN NS        ns.bob.com.
10.0                     PTR     joe.bob.com.
10.1                     PTR     mary.bob.com.

Solution 2

You will need multiple files for your reverse lookup tables, one per subnet, but there is no need to do any machine based splitting. It looks like you are already on track for that.

Share:
11,552

Related videos on Youtube

ethrbunny
Author by

ethrbunny

Updated on September 18, 2022

Comments

  • ethrbunny
    ethrbunny almost 2 years

    How do I deal with the case where a domain has addresses in more than one subnet?

    EG: (bob.com)

    joe.bob.com    A  14400  10.20.0.10  
    jim.bob.com    A  14400  10.20.0.11  
    mary.bob.com   A  14400  10.20.1.10  
    susan.bob.com  A  14400  10.20.1.11 
    

    (0.20.10.in-addr.arpa)

    0.20.10.in-addr.arpa    14400   NS    bob.com  
    0.20.10.in-addr.arpa    14400   PTR   blahblahblah   
    10                      14400   PTR   joe  
    11                      14400   PTR   jim
    

    (1.20.10.in-addr.arpa)

    1.20.10.in-addr.arpa    14400   NS    bob.com  
    1.20.10.in-addr.arpa    14400   PTR   blahblahblah   
    10                      14400   PTR   mary  
    11                      14400   PTR   susan
    

    I have my 'forward' zone file setup - seems like I need multiple 'reverse' files though.

    zone "bob.com" {
        type: master;
        etcetc
    };
    
    zone "0.20.10.in-addr.arpa" {
        type: master;
        etcetc
    };
    
    zone "1.20.10.in-addr.arpa" {
        type: master;
        etcetc
    };
    

    Can I put both of these entries in named.conf on the same machine or do I have to break it up somehow between multiple files / machines?

  • voretaq7
    voretaq7 about 13 years
    To add - The traditional solution is to create one reverse zone per class C network (/24).
  • voretaq7
    voretaq7 about 13 years
    This is also a good option if your subnets are logically broken out in some way other than by Class C blocks -- e.g. my company uses 10.site.section.x addresses, so we have a site.10.in-addr.arpa reverse zone for each site and only have to edit one spot when IP assignments at a given site change
  • richardaum
    richardaum almost 9 years
    For same machine, how does it ?