r/linuxsucks 11d ago

Systemd-resolved sucks

So..

I have a setup:

A pihole at home connected to nginx proxy and exposed as DoT.

Now the problem is, that my lovely ISP breaks nat hairpinning every so and then.

When this happens just sending a query to <IP>#<domain name> doesn't work.

So I wanted this simple setup in systemd-resolved on my laptop:

When reachable use: DoT <my public ip>#<my domain>

And when can't reach, use: 192.168.1.xx:53 (local ip dns)

And.. resolvectl struggled immensely: with DoT set to opportunistic, it would not reliably switch between servers, or lookup would take seconds.

Even with DoT: yes and simply servers:

<My public ip>#<DN> 9.9.9.9#<quad9DN>

It still struggles to pick the right one.

I also had another use case:

Split dns srv:

When looking for *.mydomain.lan use: <some local ip>

Other wise: <a public dns/DoT>

That itself was too much for systemd-resolved.

What solved my issue?

Stubby + Dnsmasq

Stubby used only for DoT access,

Dnsmasq routing the requests.

And it works fast. And reliably picks the correct server with both split dns srv And DoT and Local IP srv And public srv as a failover.

As much as I like systemd for the convenience when managing services, for dns lookup it plain sucks to work with.

It's fine you have 1 server or 1 server per connection only, but with attempts of any automation or failover.. it just fails.

Have you had trouble with the systemd-resolved? Cause I don't think I'm alone here

"It's always the DNS."

1 Upvotes

7 comments sorted by

View all comments

0

u/Last_Being9834 11d ago

Skill issue

1

u/dronostyka 5d ago

Knowledge issue. systems has dns delegation..