I have to create A and NS records for 100 domains, I am able to do this the following default/common way
Example for one domain, a.com
nano /etc/bind/named.conf.default-zones
append
zone "a.com" {
type master;
file "/etc/bind/a.com";
};
Then create a.com zone file and add the following
nano /etc/bind/a.com
$TTL 1h
@ IN SOA a.com. root.a.com. (
2013080701 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ) ; minimum
a.com. IN NS a.com.
a.com. IN A 11.11.11.11
The problem with this way is I must manually create 100 zone files and update the default-zones file and create 100 matching zone entries
I am wondering if there is a way I can do it something like the following theoretical psuedo code
nano /etc/bind/named.conf.default-zones
zone "." {
type master;
file "/etc/bind/all";
};
nano /etc/all
$TTL 1h
@ IN SOA a.com. root.a.com. (
2013080701 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ) ; minimum
a.com. IN NS a.com.
a.com. IN A 11.11.11.11
b.com. IN NS b.com.
b.com. IN A 22.22.22.22
c.com. IN NS c.com.
c.com. IN A 33.33.33.33
d.com. IN NS d.com.
d.com. IN A 44.44.44.44
e.com. IN NS e.com.
e.com. IN A 55.55.55.55
...
This way we just have to update the all zone file and add our entries.