Bloom Filter CoreDNS Plugin
Serves up a bloom
file as a DNS zone. Useful to make bloom filter queries available via the network
Compilation
This package will always be compiled as part of CoreDNS and not in a standalone way. It will require you to use go get
or as a dependency on plugin.cfg.
The manual will have more information about how to configure and extend the server with external plugins.
A simple way to consume this plugin, is by adding the following on plugin.cfg, and recompile it as detailed on coredns.io.
bloom:github.com/mosajjal/bloom-coredns
Put this early in the plugin list, so that bloom is executed before any of the other plugins.
After this you can compile coredns by:
go generate
go build
Or you can instead use make:
make
Syntax
bloom
Metrics
If monitoring is enabled (via the prometheus directive) the following metric is exported:
coredns_bloom_request_count_total{server}
- query count to the bloom plugin.
The server
label indicated which server handled the request, see the metrics plugin for details.
Ready
This plugin reports readiness to the ready plugin. It will be immediately ready.
Examples
In this configuration, we configure a bloom filter consisting SHA1 hashes of known files in the OS
. {
bloom /opt/mybloom/hashes.bloom
}
If the bloom is gzipped:
. {
bloom /opt/mybloom/hashes.bloom.gz gzip
}
if the query exists, the result would be a NOERROR
CNAME
with the input plus a trailing .
at the end. if the query is not present, you'll get an empty NXDOMAIN
response. note that bloom filters are case-sensitive hence the DNS query and responses are also case-preserving. This behaviour is not strictly RFC-compliant, so take that into account if you're planning to put this instance of coredns
behind other DNS servers. always keeping client, server and blooms lower-case solves this issue.
Also See
See the manual.