2

I'm spinning off a subdomain from my company's domain. Now, it has been some time since I do DNS/BIND configuration, so I need your help to ensure that my configuration is sane/correct:

So, for the parent domain (let's say example.com), I should add the following:

mysub    IN NS 123.231.111.222  ; This is fictitious public IP

And then I set up my own BIND server on 123.231.111.222 with the following contents:

$TTL 600
$ORIGIN mysub.example.com.

@  IN  SOA  ns1 hostmaster (
    2016051201 ; serial
    1h         ; slave refresh
    5m         ; slave retry
    24h        ; slave expiry
    30m        ; nxdomain ttl    
)

@    IN  NS  ns1
@    IN  TXT "v=spf1 ...spf statements follow..."
@    IN  A  123.231.111.222

ns1  IN  A  123.231.111.222

; definition of various hosts in this subdomain follows

So, did I forget/overlook something? Or maybe I have done any mistakes?

1 Answer 1

3

The basic structure looks fine, but the NS records are bogus. The target must always point at a name, not an IP address. Assuming that you want the name of the target to exist in the newly created zone (based on your example), you will also need glue records.

First zone:

$ORIGIN example.com
; apex records omitted

mysub     IN NS  ns1.mysub
mysub     IN NS  ns2.mysub
ns1.mysub IN A   203.0.113.1
ns2.mysub IN A   198.51.100.1

Second zone:

$ORIGIN mysub.example.com.
; apex SOA omitted

@    IN  NS  ns1
@    IN  NS  ns2
ns1  IN  A   203.0.113.1
ns2  IN  A   198.51.100.1

(Yes, I'm pedantic and put a second nameserver on a different network in there.)

1
  • Thanks! I knew I have forgotten something... because my configuration looks "too easy" :-P ... yeah, NS to FQDN and glue records, that's what I've forgotten. Marking your answer as 'the' :-)
    – pepoluan
    May 12, 2016 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .