SYSTEMD.DNS-DELEGATE(5)
๐ systemd.dns-delegate โ DNS Server Delegation Configuration ๐
okay bestie, this is the systemd.dns-delegate page from the systemd.dns-delegate manual, and it's literally about telling your DNS lookups where to go. no cap. let's get into it ๐ฆ
โจ SYNOPSIS โจ
/etc/systemd/dns-delegate.d/*.dns-delegate
/run/systemd/dns-delegate.d/*.dns-delegate
/usr/local/lib/systemd/dns-delegate.d/*.dns-delegate
/usr/lib/systemd/dns-delegate.d/*.dns-delegate
๐ธ DESCRIPTION ๐ธ
so the way this works: *.dns-delegate files are how you delegate DNS lookups in specific domains to specific DNS servers. these files get read by systemd-resolved.service(8), which is the main character doing all the resolving around here ๐
every single one of these files defines a combination of one or more DNS servers and one or more DNS domains. and each definition synthesizes a DNS lookup scope โ which means lookups below the domains you specified get sent to the DNS servers you specified. and lowkey, this can happen in addition to any per-interface scopes and the global scope that systemd-resolved maintains anyway. so it's not replacing anything, it's stacking. iconic behavior tbh.
๐ [DELEGATE] SECTION OPTIONS ๐
DNS=โ takes one or more DNS server specifications, using the exact same syntax as the option of the same name inresolved.conf(5). copy-paste energy, we love to see it โจ
Added in version 258.
Domains=โ takes one or more domain name specifications, again in the same syntax as the option of the same name inresolved.conf(5). fr fr, go read that one if you need the syntax deets ๐ซถ
Added in version 258.
DefaultRoute=โ takes a boolean value, and it defaults to off. this controls whether this DNS server is a candidate for looking up records for which no better route exists. so likeโฆ the fallback bae ๐
Added in version 258.
FirewallMark=โ takes a 32 bit unsigned integer value. this controls the firewall mark of packets generated by the socket used to make DNS requests for this DNS delegate. you can use it in your firewall logic to filter packets coming from this socket. technically it sets theSO_MARKsocket option โ seeiptables(8)for the details ๐ฅ
Added in version 260.
๐ EXAMPLES ๐
Example 1.
# /etc/systemd/dns-delegate.d/foobar.dns-delegate
[Delegate]
DNS=203.0.113.47
Domains=foobar.com
FirewallMark=42
this ensures that lookups of "foobar.com" and any domains below it are directed to DNS server 203.0.113.47, and that any packets related to this lookup have a firewall mark set to 42. periodt. ๐
โจ
๐ SEE ALSO ๐
okay that's the whole page bestie, you ate it ๐ this was the systemd.dns-delegate manual, served up by systemd 262.1 โ go forth and delegate those lookups, you've got this ๐ฆ๐๐ธ
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms