Skip to content

resolved

Type definitions for resolved.conf — the systemd-resolved DNS configuration file, and per-link resolved configuration.

import type { ResolvedConf, ResolvedLinkConf } from '@sysopkit/linux/systemd/resolved';
type ResolvedConf = {
Resolve: {
DNS?: string;
FallbackDNS?: string;
Domains?: string;
LLMNR?: 'yes' | 'no' | 'resolve';
MulticastDNS?: 'yes' | 'no' | 'resolve';
DNSOverTLS?: 'yes' | 'no' | 'opportunistic';
DNSSEC?: 'yes' | 'no' | 'allow-downgrade';
Cache?: 'yes' | 'no' | 'no-negative';
CacheFromLocalhost?: 'yes' | 'no';
DNSStubListener?: 'yes' | 'no' | 'udp' | 'tcp';
DNSStubListenerExtra?: string;
ReadEtcHosts?: 'yes' | 'no';
ResolveUnicastSingleLabel?: 'yes' | 'no';
staleRetentionSec?: string;
};
};

Per-interface DNS settings:

type ResolvedLinkConf = {
Resolve: {
DNS?: string;
Domains?: string;
LLMNR?: 'yes' | 'no' | 'resolve';
MulticastDNS?: 'yes' | 'no' | 'resolve';
DNSOverTLS?: 'yes' | 'no' | 'opportunistic';
DNSSEC?: 'yes' | 'no' | 'allow-downgrade';
};
};
OptionDescription
DNSSpace-separated list of DNS server addresses. Supports port, interface, and SNI.
FallbackDNSFallback DNS servers when no other DNS info is available.
DNSSECDNSSEC validation: "yes", "no", or "allow-downgrade".
DNSOverTLSDNS-over-TLS mode: "yes", "no", or "opportunistic".
DNSStubListenerStub resolver listener mode. Set to "no" when using local DNS forwarder.
CacheDNS caching behavior. "no-negative" caches only positive answers.
LLMNR / MulticastDNSLink-local name resolution protocols.