Redirect only second and third level domains

Reindl Harald h.reindl at thelounge.net
Fri Feb 24 08:57:11 UTC 2017



Am 24.02.2017 um 09:42 schrieb Andrea Gabellini:
> the server is a resolver for about 20K clients. My goal is to supply a
> courtesy page if a domain is not found. For every domain.

for the sake of other admins and their services which may rely on 
correct working NXDOMAIN please don't do that

> Il 23/02/2017 20:38, Warren Kumari ha scritto:
>> On Thu, Feb 23, 2017 at 7:21 AM, Andrea Gabellini
>> <andrea.gabellini at telecomitalia.sm> wrote:
>>> Hi,
>>>
>>> I would like to redirect the NXDOMAIN responses to a courtesy page but
>>> only for second and third level domains. I mean something like:
>>>
>>> *.*. IN A 1.2.3.4
>>> *.*.*. IN A 1.2.3.4
>>>
>>> that obviously doesn't work. Is there a solution to do it?
>> I don't think that there is, but your question is somewhat vague -- is
>> this for second / third levels *within a domain you are authoritative
>> for*?
>>
>> If so, *.example.com is the closest you can do without some serious futzing.
>> If you want to do this during recursion, nope, you cannot really
>> accomplish this with BIND -- not, even if you could, it sounds like a
>> really really bad idea.
>>
>> What are you actually trying t odo?
>>
>> W
>>
>>>
>>> Actually my configuration is:
>>>
>>> zone "." in {
>>>   type redirect;
>>>   file "redirect";
>>> };
>>>
>>> and the zone file is:
>>>
>>> $TTL 300
>>> @ IN SOA dns.example.com. hostmaster.example.com. 2017020202 0 0 0 0
>>> @ IN NS dns.example.com.
>>> ;
>>> *. IN A 1.2.3.4


More information about the bind-users mailing list