Systemd/resolved: Difference between revisions

Tie-ling (talk | contribs)
use nixos config module
resolved module was converted to RFC42-style settings in 26.05
Tags: Manual revert Visual edit
 
(4 intermediate revisions by 3 users not shown)
Line 12: Line 12:


= Configuration Example: Enforce secure DNS =
= Configuration Example: Enforce secure DNS =
See also [[Encrypted DNS]].


The following configuration configures resolved daemon to use the public DNS resolver provided by [https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/ Cloudflare]. DNSSEC and DNS-over-TLS is enabled for authenticity and encryption.
The following configuration configures resolved daemon to use the public DNS resolver provided by [https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/ Cloudflare]. DNSSEC and DNS-over-TLS is enabled for authenticity and encryption.
Line 24: Line 26:
services.resolved = {
services.resolved = {
   enable = true;
   enable = true;
   dnssec = "true";
   settings.Resolve = {
  domains = [ "~." ];
    DNSSEC = "true";
  fallbackDns = [
    Domains = [ "~." ];
    "1.1.1.1"
    DNSOverTLS = "true";
    "1.0.0.1"
    FallbackDNS = [
  ];
      "1.1.1.1"
   dnsovertls = "true";
      "1.0.0.1"
    ];
   };
};
};
</syntaxhighlight>
</syntaxhighlight>