Score:0

Systemd-resolved not querying local server (dnsmasq) when offline

us flag

I have configured dnsmasq to handle some local domains, with config like this:

address=/local/127.0.0.1
address=/devel/127.0.0.1

/etc/systemd/resolved.conf was changed to:

[Resolve]
DNS=127.0.1.1 # dnsmasq server local IP
Domains=devel local

So, everything works pretty much well, resolving works nice:

$ nslookup foo.devel
Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   foo.devel
Address: 127.0.0.1

But when I disconnect from all the networks, that is when I'm offline, name resolution with resolved breaks:

$ nslookup foo.devel
Server:         127.0.0.53
Address:        127.0.0.53#53

** server can't find foo.devel: SERVFAIL

However, dnsmasq still works:

$ nslookup foo.devel 127.0.1.1
Server:         127.0.1.1
Address:        127.0.1.1#53

Name:   foo.devel
Address: 127.0.0.1

So, my question is, how do I make resolved work offline, and pass requests to dnsmasq at least for the domains listed int Domains config option?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.