0

I'd like to setup dnsmasq as DNS-only server for blocking certain domains. But instead of having it return 127.0.0.1 or 0.0.0.0 or such, I'd like it to respond with a No such name. just as if the name does not exist at all.

How to I filter certain domains?

1 Answer 1

1

You could make dnsmasq authoritative for those domains with the --auth-zone option, and simply not add any DNS records for those domains.

3
  • You can't configure it inside dnsmasq.conf, can you? Adding a lot of hosts using the command line parameters seems not to be a practicable.
    – bot47
    Apr 27, 2014 at 10:22
  • 1
    All dnsmasq command line options can also be used as configuration parameters. Apr 27, 2014 at 10:24
  • OK, works. Although this approach seems quite contraintuitive to me.
    – bot47
    Apr 27, 2014 at 10:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .