3

I have a BIND9 database with a wildcard record:

* IN CNAME host.mydomain.tld.

I want to get my DNS server to "spoof" NXDOMAIN for chosen names:

nxhost1 => NXDOMAIN
nxhost2 => NXDOMAIN
etc...

Is this achieveable with BIND9?

If so, how can I do it?

Thanks.

3
  • 2
    @AndrewB the answer there is certainly better, but the question here is clearer and more specific...is merging answers a 'thing'?
    – pete
    Jun 20, 2015 at 19:58
  • 2
    @pete The criteria for a dupe close is the answer more than the question, as the question being closed does not get deleted unless it is negatively scored. It's possible to merge answers into another question but it happens rarely - usually by someone's request and if the answer adds something to an older Q&A.
    – Andrew B
    Jun 20, 2015 at 20:04
  • The answer from the other article seems to be the closest to what I was looking for. I'll choose and mark the best answer after I've tested (soon...). Thank you. Jun 24, 2015 at 8:43

1 Answer 1

2

There are a couple ways about this, as i understand:

-As of BIND 9.9 there is Response Policy Zone Rewriting (RPZ), which allows an ip or dname match to be rewritten, two of the options are returning NXDOMAIN & NODATA - BIND 9.9 Reference Manual

-I've saw method (but haven't tried, i use NSD and this doesn't work) that you can create an empty SOA for that specific zone, and as a result should return NXDOMAIN. i'll update if i can find the page again

although not BIND, i'll mention that Unbound also has config options for returning NXDOMAIN

Related:

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