Redirect only second and third level domains

Andrea Gabellini andrea.gabellini at telecomitalia.sm
Fri Feb 24 08:42:17 UTC 2017


Hi,

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.

A query for abc.example.com or example.com (and these do not exist) has
to receive the address of the courtesy web server.

A query for xyz.abc.example.com (and this do not exists), have to
receive NXDOMAIN.

This is a workaround for queries made to the dnsbl services like
spamhaus.org or mailspike.org, where the queries are of type
"4.3.2.1.zen.spamhaus.org". If the redirect is for all levels of the
domain, there is a response and the antispam system thinks that this IP
is in blacklist.

Andrea

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
>>
>> Thanks,
>> Andrea
>>
>> --
>> ----------------------------------------------------------------
>> If today was a fish, I'd throw it back in !
>>
>> ----------------------------------------------------------------
>>
>> Ing. Andrea Gabellini
>> Email: andrea.gabellini at telecomitalia.sm
>> Skype: andreagabellini
>> Tel: (+378) 0549 886111
>> Fax: (+378) 0549 886188
>>
>> Telecom Italia San Marino S.p.A.
>> Via XXVIII Luglio, 212 - Piano -2
>> 47893 Borgo Maggiore
>> Republic of San Marino
>>
>> http://www.telecomitalia.sm
>>
>> _______________________________________________
>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>>
>> bind-users mailing list
>> bind-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/bind-users
>
>

-- 
----------------------------------------------------------------
The truth is more important than the facts.

----------------------------------------------------------------

Ing. Andrea Gabellini
Email: andrea.gabellini at telecomitalia.sm
Skype: andreagabellini
Tel: (+378) 0549 886111
Fax: (+378) 0549 886188

Telecom Italia San Marino S.p.A.
Via XXVIII Luglio, 212 - Piano -2
47893 Borgo Maggiore
Republic of San Marino

http://www.telecomitalia.sm



More information about the bind-users mailing list