I have a server that uses netplan
to configure systemd-resolved
for local name resolution. I’m happy with the default DNS resolvers in use, but want to use a different resolver for specific subdomains.
e.g. I might want to use CloudFlare DNS (1.1.1.1, 1.0.0.1) by default, but also specifically use Google Public DNS (8.8.8.8, 8.8.4.4) for subdomains of google.com
. (These are example values, not the actual use-case.)
systemd-resolved
does support have the concept of routing-domains - for example an interface being added that resolves *.internal
addresses to a local nameserver by specifying ~internal
as the search-domain. But unfortunately specific nameserver routing can only be configured on a per-link basis.
One hacky way around this would be to add new interfaces just to update t