Why do DNS-based adblockers return 0.0.0.0 instead of NXDOMAIN?

3

1

There's a number of projects out there that block ads at the router level by intercepting DNS requests for known bad domains. Most of them seem to work by resolving the offending domains to 0.0.0.0.

I'm pretty sure 0.0.0.0 isn't a valid destination address. All documentation I can find on it treats it as either a source address only, or a magic value in conf files to indicate "all addresses on the local machine."

I am guessing such DNS services avoid using 127.0.0.1 because the requesting host might be running a webserver itself. But I don't understand why they don't return NXDOMAIN instead of either; rejecting the domain entirely seems more appropriate than returning a bogus address.

Andrew

Posted 2018-08-17T22:10:36.017

Reputation: 212

Question was closed 2018-08-18T17:06:55.630

On Linux not specifying source nor destination (that means INADDR_ANY == 0.0.0.0 for both values) gets the kernel to choose 127.0.0.1 for both. So 0.0.0.0 is valid here. I bet the same is happening on Windows (but can't test) – A.B – 2018-08-18T19:04:44.653

No answers