Bugtraq mailing list archives

Re: DNS query spam


From: Stephen Stuart <stuart () tech org>
Date: Wed, 30 Nov 2005 04:41:37 +0000

Assuming you use Bind, can edit your named.conf file, only wish to  
provide recursive DNS services (ie. handle queries for domains that  
you are not authoritative for) to a known range of IP addresses, and  
the query is for a domain that you're not authoritative for, you can  
solve the problem by adding something like this to named.conf:

options {
    allow-recursion { 127.0.0.1/32; };
};

That particular setting would cause Bind to ignore recursive queries  
from all IP addresses except 127.0.0.1 (localhost).  My DNS server  
only provides recursive queries for itself, so the setting was easy  
for me.  After I started blocking recursive queries, it took a week  
or so for the bogus traffic to stop.  But in the mean time, since I  
wasn't sending responses, the amount of my bandwidth that was wasted  
decreased dramatically.

Small correction: that will cause BIND to not perform recursive
queries from any IP address except 127.0.0.1. You will still answer
queries from cache for all comers, unless you also restrict queries in
general to 127.0.0.1/32:

options {
    allow-query { 127.0.0.1/32; };
};

Stephen


Current thread: