#DNS #BIND #dig #named #dnssec

app trust-dns

Trust-DNS is a safe and secure DNS server with DNSec support. Eventually this could be a replacement for BIND9. The DNSSec support allows for live signing of all records, in it does not currently support records signed offline. The server supports dynamic DNS with SIG0 authenticated requests. Trust-DNS is based on the Tokio and Futures libraries, which means it should be easily integrated into other software that also use those libraries.

51 releases

✓ Uses Rust 2018 edition

0.19.2 Jan 17, 2020
0.18.1 Jan 5, 2020
0.18.0 Dec 22, 2019
0.18.0-alpha.1 Oct 27, 2019
0.4.0 Nov 9, 2015

#14 in Network programming

Download history 687/week @ 2019-10-15 576/week @ 2019-10-22 478/week @ 2019-10-29 372/week @ 2019-11-05 335/week @ 2019-11-12 528/week @ 2019-11-19 867/week @ 2019-11-26 1006/week @ 2019-12-03 1750/week @ 2019-12-10 1182/week @ 2019-12-17 737/week @ 2019-12-24 543/week @ 2019-12-31 1906/week @ 2020-01-07 1942/week @ 2020-01-14 1086/week @ 2020-01-21

3,767 downloads per month
Used in 17 crates (15 directly)

MIT/Apache and maybe MPL-2.0

1.5MB
25K SLoC

Overview

Trust-DNS provides a binary for hosting or forwarding DNS zones.

This a named implementation for DNS zone hosting. It is capable of performing signing all records in the zone for server DNSSec RRSIG records associated with all records in a zone. There is also a named binary that can be generated from the library with cargo install trust-dns. Dynamic updates are supported via SIG0 (an mTLS authentication method is under development).

Features

  • Dynamic Update with sqlite journaling backend (SIG0)
  • DNSSEC online signing (NSEC not NSEC3)
  • DNS over TLS (DoT)
  • DNS over HTTPS (DoH)
  • Forwarding stub resolver
  • ANAME resolution, for zone mapping aliass to A and AAAA records
  • Additionals section generation for aliasing record types

DNS-over-TLS and DNS-over-HTTPS

Support of TLS on the Server is managed through a pkcs12 der file. The documentation is captured in the example test config file, example.toml. A registered certificate to the server can be pinned to the Client with the add_ca() method. Alternatively, as the client uses the rust-native-tls library, it should work with certificate signed by any standard CA.

DoT and DoH are supported. This is accomplished through the use of one of native-tls, openssl, or rustls (only rustls is currently supported for DoH). The Resolver requires only requires valid DoT or DoH resolvers being registered in order to be used.

To use with the Client, the TlsClientConnection or HttpsClientConnection should be used. Similarly, to use with the tokio AsyncClient the TlsClientStream or HttpsClientStream should be used. ClientAuth, mTLS, is currently not supported, there are some issues still being worked on. TLS is useful for Server authentication and connection privacy.

To enable DoT one of the features dns-over-native-tls, dns-over-openssl, or dns-over-rustls must be enabled, dns-over-https-rustls is used for DoH.

DNSSec status

Currently the root key is hardcoded into the system. This gives validation of DNSKEY and DS records back to the root. NSEC is implemented, but not NSEC3. Because caching is not yet enabled, it has been noticed that some DNS servers appear to rate limit the connections, validating RRSIG records back to the root can require a significant number of additional queries for those records.

Zones will be automatically resigned on any record updates via dynamic DNS. To enable DNSSEC, one of the features dnssec-openssl or dnssec-rustls must be enabled.

Future goals

  • Distributed dynamic DNS updates, with consensus
  • mTLS based authorization for Dynamic Updates
  • Online NSEC creation for queries
  • Full hint based resolving
  • Maybe NSEC3 and/or NSEC5 support

Minimum Rust Version

The current minimum rustc version for this project is 1.39

Versioning

Trust-DNS does it's best job to follow semver. Trust-DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Trust-DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Trust-DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed.

Dependencies

~9–14MB
~293K SLoC