Maintained by: NLnet Labs

[Unbound-users] 'SERVFAIL' reply from forwarder leads to query storm?

Karl Pielorz
Thu Jul 26 15:59:43 CEST 2012


Hi,

We're running unbound 1.4.17 under FreeBSD 9. Unbound is setup as a simple 
'forwarder' to our BIND 9 recursive servers, i.e.

"
forward-zone:
        name: "."
        forward-addr: 1.1.1.1
        forward-addr: 2.2.2.2
        forward-first: yes
"

This works, but appears to have issues for 'malformed' / invalid domains.

For example - if the client goes to query "MX for hayoo.com" (probably a 
typo of 'yahoo.com') - we see Unbound forward it to the first forwarder, 
which is running BIND - that server logs:

"
26-Jul-2012 14:16:34.864 resolver: notice: DNS format error from 
206.188.198.53#53 resolving hayoo.com/MX for client 3.3.3.3#7582: invalid 
response
"

This results in BIND returning 'SERVFAIL'. Fair enough.

Unbound then tries the second forwarder - which again logs 'invalid 
response' - and sends back SERVFAIL.

At this point - the original client request returns with 'SERVFAIL' (as 
you'd kind of hope / expect).

However - 'in background' Unbound keeps trying each forwarder in turn at 
great lengths, trying to get the query resolved e.g. running the above 
-single lookup looking at the log output for unbound gives:

"
Jul 26 14:38:46 host unbound: [85689:0] info: response for hayoo.com. MX IN
Jul 26 14:38:46 host unbound: [85689:0] info: reply from <.> 1.1.1.1#53
Jul 26 14:38:46 host unbound: [85689:0] info: query response was THROWAWAY
Jul 26 14:38:46 host unbound: [85689:0] info: response for hayoo.com. MX IN
Jul 26 14:38:46 host unbound: [85689:0] info: reply from <.> 2.2.2.2#53
Jul 26 14:38:46 host unbound: [85689:0] info: query response was THROWAWAY
Jul 26 14:38:46 host unbound: [85689:0] info: response for hayoo.com. MX IN
Jul 26 14:38:46 host unbound: [85689:0] info: reply from <.> 1.1.1.1#53
Jul 26 14:38:46 host unbound: [85689:0] info: query response was THROWAWAY
...
"

This goes on for many hundreds of lines (for the example above a single 
'dig MX hayoo.com' on the host resulted in nearly 1000 lines logged - 
nearly all were logged after the initial dig returned indicating 
'SERVFAIL').

Is there any way to stop Unbound from "rattling" around the forwarders over 
and over at great speed in this situation?

Thanks,

-Karl