Skip to content

Instantly share code, notes, and snippets.

@jobbler
jobbler / Caching and Conditional Nameserver with systemd-resolved.md
Last active January 30, 2026 10:04
Caching and Conditional Nameserver with systemd-resolved.md

Introduction

During my daily work, I need to resolve server/domains against several different nameservers based upon network connections. Normally Network Manager and the system handles this quite well based upon the DNS provided by the dhcp on the connection.

However, I have some unique cases where I need to use multiple name servers on a single connection for a single connection. This is not normally something to worry about because dns forwards to other name servers, if configured to, until a response is returned.