Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently discovered that my server was being used as part of a DNS DDOS. Basically, my BIND setup allowed recursion, and it was used to attack a certain IP address using IP spoofing.

I took the necessary measures to stop this, and disabled recursion. I'm no longer an amplifier, which I guess solves the large problem, but I'm still receiving the queries en mass, and BIND is replying with "denied" to all of them.

I'm just curious to know whether there's anything more I can do. I thought I might configure fail2ban to block them, doing something similar to the Debian recommendations, but according to other websites, and reasonable logic, this is not ideal, as an attacker could easily have me block any IP from accessing my server.

So what else can be done? Or should I just wait for the attackers to give up? Or hope they might rescan and delist me as an amplifier?

share|improve this question
If, your attack traffic targets a number of known IPs, then it's ok to blacklist them - either in iptables or inside the bind, don't need even fail2ban. Also see this question -… Also there's experimental rate-limiting patch for bind - . – Sandman4 Nov 19 '12 at 21:02
up vote 2 down vote accepted

Basically, the fail2ban setup described in the linked article modifies the firewall to DROP (for a limited time) incoming DNS queries from source IPs that are not allowed to query your DNS server. Not a bad idea, but if you're not providing authoritative DNS for one or more domains to the internet, then why not forget about fail2ban, and just DROP all incoming DNS queries from the internet altogether?

If you are running an authoritative DNS server, then, unfortunately, you don't have the luxury of ignoring DNS queries. In that case, I don't think you have much choice but to leave things as you have them (recursion off), and patiently wait for a gradual drop-off in the incoming spoofed traffic. It sure would be nice to be able to configure bind itself to silently ignore queries that it's configured not to answer, but I don't think it has that feature. (Such behaviour would technically violate DNS protocol, after all.) Fail2ban does provide something of an alternative, but as you noted, it's not ideal.

share|improve this answer
Thanks a lot. Yes, I am running an authoritative DNS server, and as you summed it, i guess I'll just have to wait. – Waleed Hamra Nov 19 '12 at 14:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.