Systemd/resolved: Difference between revisions
m 0x4A6F moved page Systemd-resolved to Systemd/resolved |
m →Configuration: nixfmt |
||
Line 8: | Line 8: | ||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> | ||
networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; | networking.nameservers = [ | ||
"1.1.1.1#one.one.one.one" | |||
"1.0.0.1#one.one.one.one" | |||
]; | |||
services.resolved = { | services.resolved = { | ||
Line 14: | Line 17: | ||
dnssec = "true"; | dnssec = "true"; | ||
domains = [ "~." ]; | domains = [ "~." ]; | ||
fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; | fallbackDns = [ | ||
"1.1.1.1#one.one.one.one" | |||
"1.0.0.1#one.one.one.one" | |||
]; | |||
dnsovertls = "true"; | dnsovertls = "true"; | ||
}; | }; | ||
</syntaxHighlight> | </syntaxHighlight> |
Revision as of 14:22, 16 April 2024
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"
];
dnsovertls = "true";
};