I'm trying to add split DNS to a wireguard tunnel (not really a wireguard question).
I have a PostUp command: resolvectl dns %i 10.160.20.15
Which translates to: resolvectl dns wg0 10.160.20.15
and it does not work.
When I just run that command as root, nothing appears to change. There is no DNS server added to the resolvectl status. If I enable DEBUG level of logging I get a LOT of messages in journalctl
but I can see no explanation of the failure.
It's too long to post here; but the only error-message
field in all of the logs which is not populated with n/a
is Link lan0 is managed
and it has another field error-name
with the value org.freedesktop.resolve1.LinkBusy
lan0
is the name of my primary Ethernet (renamed in netplan
) and, as far as I can tell, shouldn't actually be involved with this command?
If I'm naive and somehow lan0
is involved, how do I make it un-busy (unmanaged); so I can set DNS on a different interface?
EDIT: Found the following on org.freedesktop.resolve1:
org.freedesktop.resolve1.LinkBusy
The requested configuration change could not be made because systemd-networkd(8), already took possession of the interface and supplied configuration data for it.
So I guess I need to know what it means when networkd
takes possession? And how to take possession back?