2

I'have a ton of domains I want to park using the same template. I've made all neccesary changes to my nameserver.

Currently, I have to add an entry to named.conf.local for each domain that I'm pointing to my nameserver.

Current situation:

zone "example.com" {
        type master;
        file "db.parking";
};

zone "example.org" {
        type master;
        file "db.parking";
};

Desired situation:

zone "." {
        type master;
        file "db.parking";
};

dp.parking

$TTL            86400
@               IN      SOA     ns1.mynameserver.com. root.mynameserver.com. (
                                        2014061805 ; Serial //YYYYMMDDCC
                                        8h         ; Refresh
                                        4h         ; Retry
                                        2w         ; Expire
                                        1h )       ; Minimum
                        NS      ns1.mynameserver.com.
                        NS      ns2.mynameserver.com.


www                     A       my.ns1.public.ip
@                       A       my.ns1.public.ip

ns1                     A       my.ns1.public.ip
ns2                     A       my.ns2.public.ip

mail                    A       my.ns1.public.ip
imap                    CNAME   mail
pop                     CNAME   mail
smtp                    CNAME   mail

@                       MX      10 mail

Unfortunately, the desired situation (using a wildcard to let db.parking handle ALL requests, is not working.

Any thoughts are greatly appreciated!

1 Answers1

2

Bind doesn't allow this, and for a very good reason - if you were to do this, then anybody anywhere on the internet could use your nameservers for any domain they chose. This would be splendid for e.g. a spammer who doesn't want their spam to be rejected due to nonexistent hostnames.

You should use some form of script/program to generate the config file. You can use an include statement in your main config file to include a periodically generated file with the zone statements.

Jenny D
  • 28,400
  • 21
  • 80
  • 117