Systemd/resolved: Difference between revisions

From NixOS Wiki
imported>Vater
imported>Vater
mNo edit summary
Line 1: Line 1:
systemd-resolved is a [[systemd]] service that provides network name resolution to local applications via a D-Bus interface, the resolve NSS service (nss-resolve(8)), and a local DNS stub listener on 127.0.0.53. See systemd-resolved(8) for the usage.
{{DISPLAYTITLE:systemd-resolved}}
[https://www.freedesktop.org/software/systemd/man/systemd-resolved.html systemd-resolved] is a [[systemd]][[Category:systemd]] service that provides network[[Category:Networking]] name resolution to local applications via a D-Bus interface, the resolve NSS service (nss-resolve(8)), and a local DNS stub listener on 127.0.0.53. See systemd-resolved(8) for the usage.


== Configuration ==
== Configuration ==
Line 18: Line 19:
};
};
</syntaxHighlight>
</syntaxHighlight>
[[Category:Networking]]

Revision as of 03:29, 1 April 2023

systemd-resolved is a systemd service that provides network name resolution to local applications via a D-Bus interface, the resolve NSS service (nss-resolve(8)), and a local DNS stub listener on 127.0.0.53. See systemd-resolved(8) for the usage.

Configuration

The following configuration configures resolved daemon to use the public DNS resolver provided by Cloudflare. DNSSEC and DNS-over-TLS is enabled for authenticity and encryption.

networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];

services.resolved = {
  enable = true;
  dnssec = "true";
  domains = [ "~." ];
  fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
  extraConfig = ''
    DNSOverTLS=yes
  '';
};