README.md 4.21 KB
Newer Older
Jan Včelák's avatar
Jan Včelák committed
1 2
# Knot DNS Resolver

3 4
[![Build Status](https://gitlab.labs.nic.cz/knot/knot-resolver/badges/master/pipeline.svg?x)](https://gitlab.labs.nic.cz/knot/knot-resolver/commits/master)
[![Coverage Status](https://gitlab.labs.nic.cz/knot/knot-resolver/badges/master/coverage.svg?x)](https://knot.pages.labs.nic.cz/knot-resolver/)
Marek Vavruša's avatar
Marek Vavruša committed
5
[![Coverity](https://img.shields.io/coverity/scan/3912.svg)](https://scan.coverity.com/projects/3912)
Marek Vavruša's avatar
Marek Vavruša committed
6
[![Documentation Status](https://readthedocs.org/projects/knot-resolver/badge/?version=latest)](https://readthedocs.org/projects/knot-resolver/?badge=latest)
7

Vladimír Čunát's avatar
Vladimír Čunát committed
8
Knot DNS Resolver is a caching full resolver implementation written in C and [LuaJIT][luajit], both a resolver library and a daemon. The core architecture is tiny and efficient, and provides a foundation and
Vladimír Čunát's avatar
Vladimír Čunát committed
9
a state-machine like API for extensions. There are three modules built-in - *iterator*, *validator*, *cache*, and a few more are loaded by default. Most of the [rich features](https://knot-resolver.readthedocs.io/en/latest/modules.html) are written in Lua(JIT) and C. Batteries are included, but optional.
Marek Vavruša's avatar
Marek Vavruša committed
10

Vladimír Čunát's avatar
Vladimír Čunát committed
11
The LuaJIT modules, support DNS privacy and DNSSEC, and persistent cache with low memory footprint make it a great personal DNS resolver or a research tool to tap into DNS data. TL;DR it's the [OpenResty][openresty] of DNS.
Marek Vavruša's avatar
Marek Vavruša committed
12

Vladimír Čunát's avatar
Vladimír Čunát committed
13
Strong filtering rules, and auto-configuration with etcd make it a great large-scale resolver solution.
14

15
The server adopts a [different scaling strategy][scaling] than the rest of the DNS recursors - no threading, shared-nothing architecture (except MVCC cache that may be shared) that allows you to pin instances on available CPU cores and grow by self-replication. You can start and stop additional nodes depending on the contention without downtime.
Marek Vavruša's avatar
Marek Vavruša committed
16

Marek Vavrusa's avatar
Marek Vavrusa committed
17 18 19 20
It also has strong support for DNS over TCP, notably TCP Fast-Open, query pipelining and deduplication, and response reordering.

### Packages

Vladimír Čunát's avatar
Vladimír Čunát committed
21 22 23 24
Knot Resolver is packaged for
[Debian](https://packages.debian.org/sid/knot-resolver),
[Fedora](https://apps.fedoraproject.org/packages/knot-resolver/),
[Ubuntu](https://packages.ubuntu.com/zesty/knot-resolver),
Vladimír Čunát's avatar
Vladimír Čunát committed
25
[EPEL 7](https://download.fedoraproject.org/pub/epel/7/SRPMS/Packages/k/) (for RHEL 7 or CentOS 7),
Vladimír Čunát's avatar
Vladimír Čunát committed
26 27 28
[Homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/knot-resolver.rb) and
[NixOS/Nixpkgs](https://hydra.nixos.org/search?query=knot-resolver).
You can also find it as the default DNS resolver in our open-source router [Turris Omnia](https://omnia.turris.cz).
29
See the [Knot-resolver homepage](https://www.knot-resolver.cz/download/) for more information.
Vladimír Čunát's avatar
Vladimír Čunát committed
30

Vladimír Čunát's avatar
Vladimír Čunát committed
31
<!-- [openSUSE](https://software.opensuse.org/package/knot-resolver), (it seems to be in a bad shape; vulnerable 1.3.2 ATM) -->
Marek Vavrusa's avatar
Marek Vavrusa committed
32

Marek Vavruša's avatar
Marek Vavruša committed
33 34
### Building from sources

Vladimír Čunát's avatar
Vladimír Čunát committed
35
Knot DNS Resolver mainly [depends][depends] on Knot DNS libraries, [LuaJIT][luajit] and [libuv][libuv].
Marek Vavruša's avatar
Marek Vavruša committed
36
See the [Building project][depends] documentation page for more information.
Marek Vavruša's avatar
Marek Vavruša committed
37 38 39 40

### Docker image

This is simple and doesn't require any dependencies or system modifications, just run:
41 42

```
Pavel Valach's avatar
Pavel Valach committed
43
$ docker run -it cznic/knot-resolver
44 45
```

46
See the build page [hub.docker.com/r/cznic/knot-resolver](https://hub.docker.com/r/cznic/knot-resolver/) for more information and options.
Marek Vavruša's avatar
Marek Vavruša committed
47 48

### Running
49

Marek Vavrusa's avatar
Marek Vavrusa committed
50
The project builds a resolver library in the `lib` directory, and a daemon in the `daemon` directory. It requires no configuration or parameters to run a server on localhost.
51 52

```
Marek Vavrusa's avatar
Marek Vavrusa committed
53
$ kresd
54
```
Marek Vavruša's avatar
Marek Vavruša committed
55

56
See the documentation at [knot-resolver.readthedocs.io][doc] for more options.
Marek Vavruša's avatar
Marek Vavruša committed
57

Vladimír Čunát's avatar
Vladimír Čunát committed
58 59 60
[depends]: https://knot-resolver.readthedocs.io/en/stable/build.html
[doc]: https://knot-resolver.readthedocs.io/en/stable/index.html
[scaling]: https://knot-resolver.readthedocs.io/en/stable/daemon.html#scaling-out
Marek Vavruša's avatar
Marek Vavruša committed
61
[deckard]: https://gitlab.labs.nic.cz/knot/deckard
Vladimír Čunát's avatar
Vladimír Čunát committed
62 63
[luajit]: https://luajit.org/
[libuv]: http://libuv.org
Marek Vavruša's avatar
Marek Vavruša committed
64
[openresty]: https://openresty.org/
The Gitter Badger's avatar
The Gitter Badger committed
65 66 67

### Contacting us

Vladimír Čunát's avatar
Vladimír Čunát committed
68 69 70 71
- [GitLab issues](https://gitlab.labs.nic.cz/knot/knot-resolver/issues) (you may authenticate via GitHub)
- [mailing list](https://lists.nic.cz/cgi-bin/mailman/listinfo/knot-resolver-users)
- [![Join the chat at https://gitter.im/CZ-NIC/knot-resolver](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CZ-NIC/knot-resolver?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)