🐧 Linux TippsDistribution Release: Grml 2026.09(04.09.2026 um 01:39 Uhr)
🔧 ProgrammierungDistribution Release: Talos Linux 1.14.0(04.09.2026 um 11:06 Uhr)
🐧 Linux TippsDistribution Release: Zenwalk GNU Linux Current-260905(05.09.2026 um 22:05 Uhr)
🔧 AI Nachrichten DistroWatch Weekly, Issue 1189(07.09.2026 um 02:18 Uhr)
🐧 Linux TippsDistroWatch Weekly, Issue 1190(14.09.2026 um 02:11 Uhr)
🐧 Linux TippsSecurity: Denial of Service in perl-Protocol-HTTP2 (Fedora)(15.09.2026 um 07:55 Uhr)
🐧 Linux TippsSecurity: Mangelnde Rechteprüfung in perl-Dancer2 (Fedora)(15.09.2026 um 07:58 Uhr)
🐧 Linux TippsSecurity: Denial of Service in perl-Protocol-HTTP2 (Fedora)(15.09.2026 um 07:58 Uhr)
🐧 Linux TippsDistribution Release: Grml 2026.09(04.09.2026 um 01:39 Uhr)
🔧 ProgrammierungDistribution Release: Talos Linux 1.14.0(04.09.2026 um 11:06 Uhr)
🐧 Linux TippsDistribution Release: Zenwalk GNU Linux Current-260905(05.09.2026 um 22:05 Uhr)
🔧 AI Nachrichten DistroWatch Weekly, Issue 1189(07.09.2026 um 02:18 Uhr)
🐧 Linux TippsDistroWatch Weekly, Issue 1190(14.09.2026 um 02:11 Uhr)
🐧 Linux TippsSecurity: Denial of Service in perl-Protocol-HTTP2 (Fedora)(15.09.2026 um 07:55 Uhr)
🐧 Linux TippsSecurity: Mangelnde Rechteprüfung in perl-Dancer2 (Fedora)(15.09.2026 um 07:58 Uhr)
🐧 Linux TippsSecurity: Denial of Service in perl-Protocol-HTTP2 (Fedora)(15.09.2026 um 07:58 Uhr)

🔧 Programmierung 🕛 vor 3 Monaten 2 Min Lesezeit
0

A Caddy Cert Expired Because systemd-resolved Was Selectively Lying

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Here's something that took longer to debug than it should have.






The setup



Running Caddy as a reverse proxy on a systemd-based Linux machine. Cert renewal via ACME. Everything looks fine in the logs. Then one day the cert is expired and nobody noticed for two days.






The cause



systemd-resolved has a behavior where it returns SERVFAIL for specific DNS queries depending on the upstream resolver situation. It's not consistent. Some zones resolve fine. Some silently fail. Caddy's ACME client sends the challenge request, systemd-resolved reports a failure, and the renewal just... doesn't happen.



What makes this annoying is that systemd-resolve --status shows nothing wrong. dig might work fine against 8.8.8.8. The stub resolver is the one lying to your application, and it doesn't log it anywhere useful.






The fix



Three ways to deal with it:



1. Bypass the stub resolver



Point Caddy (or Go's net stack generally) at a public resolver directly. In your Caddyfile:




CODE
{
servers :443 {
dns resolver 1.1.1.1
}
}






Or set GODEBUG=netdns=go to force the Go resolver instead of trusting the system resolver configuration.



2. Restart systemd-resolved



systemctl restart systemd-resolved clears out whatever broken state it accumulated. This is a temporary fix — you'll hit it again.



More permanently, check /etc/resolv.conf and make sure you're not relying on the stub resolver for everything.



3. Use DNS-over-HTTPS



If you want to stay with resolved but make it less fragile, configure it to use DoH upstream instead of plain UDP. Won't solve the SERVFAIL case but avoids a class of MITM issues.






The symptom worth knowing



The specific symptom: Caddy logs say renewal failed but give no obvious reason. caddy list shows the cert is expiring soon. Everything else keeps working. Browsers cache cert expiry warnings, so users stop complaining — and then it becomes your problem on a Monday morning.






Bottom line



If you're running Caddy on systemd-resolved and your certs are expiring unexpectedly, check the stub resolver before checking anything else. It's the kind of failure that hides in plain sight because "DNS is working."






Not a sponsor. Just something that wasted an afternoon.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
Latest Windows 11 update restores your taskbar control, patches 995 security flaws
1 Quelle
OpenAI’s new Astra model is finally here – why safety experts are worried
1 Quelle
You can doodle in ChatGPT now, and it’ll transform your drawings into polished images – how to try it
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten A Caddy Cert Expired Because systemd-resolved Was Selectively Lying

Thematisch verwandte Begriffe: Caddy, Cert, Expired, Because · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...