Full caching DNS resolver implementation
open sourceGPL-3.0-or-laterself-hostablefree
Knot Resolver is CZ.NIC's caching, DNSSEC-validating DNS resolver, made to scale from home routers to large resolver farms; Cloudflare calls it the cornerstone of its 1.1.1.1 public resolver. A small core in C and LuaJIT does iteration, validation and caching, and optional modules add everything else. Instead of threads it runs independent workers that can share one cache, so workers can be pinned to CPU cores and added or stopped without downtime. Since version 6 a manager written in Python takes declarative YAML configuration and an HTTP API for live changes, with the kresctl command. It serves DNS over TLS, HTTPS and QUIC, forwards chosen domains (also over TLS), and filters with policies, views and ACLs, local data and RPZ, DNS64 and Lua scripting. GPLv3 or later, with paid support with an SLA from CZ.NIC.
Ways to install
Package managers
Problems it solves
- run a validating DNS resolver for an ISP's customers that scales across every CPU core
- add or remove DNS resolver workers under load without dropping queries
- change DNS resolver settings through an HTTP API instead of editing files and restarting
- offer DNS over HTTPS and DNS over QUIC to our users from our own resolver
- block malicious domains on our recursive resolver with response policy zones
- apply different DNS filtering policies to different client networks on one resolver
- forward lookups for internal domains to our own DNS servers over TLS and resolve everything else
- build a DNS filtering service on top of a recursive resolver we can script in Lua
- keep the DNS cache across resolver restarts so it doesn't start cold
- synthesize IPv6 answers with DNS64 for clients on an IPv6-only network
- a DNSSEC-validating caching resolver small enough for a home router
Features
- caching, DNSSEC-validating recursive resolution
- DNS over TLS, DNS over HTTPS and DNS over QUIC
- forwarding, including forwarding over TLS
- policies, views and ACLs, local data and RPZ
- DNS64, rebinding protection and IP address renumbering
- shared-nothing workers with a shared cache, scaled without downtime
- persistent cache, prefetching and serving expired records
- manager with declarative YAML configuration and an HTTP management API
- kresctl command-line utility
- modules in C and LuaJIT; Lua scripting
View 1 more
- statistics with metrics export, including Graphite and InfluxDB
Limitations
- Official Docker image isn't for production: CZ.NIC publishes it as an easy way to try the resolver3
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Takes plugins | plan not known |
Alternatives
The same job
These do what Knot Resolver does.
- Unbound A validating, recursive, and caching DNS resolver
- PowerDNS Recursor A high-performance DNS recursor with built-in scripting capabilities
- Technitium DNS Server Self host a DNS server for privacy & security
- BIND 9 Versatile, classic, complete name server software
- Numa Portable DNS resolver: ad blocking, local .numa names and private upstream queries
- Knot DNS High-performance authoritative-only DNS server
