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!

  • Please also show the content of db.parking. – Sacx Jun 18 '14 at 10:10
  • Try this and see if this is working: http://mterry.name/log/2008/04/14/wildcard-dns-with-bind/. If your zone is . then you should have in db.parking .* IN A IP – Sacx Jun 18 '14 at 10:29
  • Thanks Sacx! Unfortunately, that didn't do the trick. I still have to add each domain to named.conf.local to get it working properly. Any additional thoughts? Many thanks! – user3744173 Jun 18 '14 at 13:12

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
  • 27,358
  • 21
  • 74
  • 110
  • Is true if the spammer is targeting the domain in questions. I tried a blackhole DNS several years ago and in that time was working. – Sacx Jun 18 '14 at 10:32