0

Setup:

A debian jessie device connection via ppp to the internet

We use systemd-networking and no /etc/network/interface at all.

systemd-resolved is used for DNS.

Versions:

systemctl --version
systemd 230
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN
armv7l GNU/Linux
kernel 4.4.14-v7+

(versions are the ones from jessie-backports)

This works fine for Ethernet + W-Lan, but fails for ppp.

Reason: the custom hook up scripts

0000usepeerdns 000resolvconf

are still writing to /etc/resolv.conf instead of connecting to the dbus server systemd-resolved provides.

so i am trying to get the PPP interface to have DNS resolution, which should be possible by calling SetLinkDNS via DBUS from what i did read (links at the end)

Get the interface ID (5 in our case)

ip l
..
5: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 700 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 3                                                         
link/ppp    
..

Read out current status of link interface 5

busctl introspect org.freedesktop.resolve1 /org/freedesktop/resolve1/link/_35 |grep DNS 
.DNS                                property  a(iay)    0                 -

set DNS on Interface 5 with 1 IPV4 Address (google DNS as example) (whats the explanation of the 3rd integer?)

busctl call org.freedesktop.resolve1 /org/freedesktop/resolve1 org.freedesktop.resolve1.Manager SetLinkDNS 'ia(iay)' 5 1 2 4 8 8 8 8
Link ppp0 is managed.

Read out values, still empty, so it failed to insert those value.

busctl introspect org.freedesktop.resolve1 /org/freedesktop/resolve1/link/_35 |grep DNS 
.DNS                                property  a(iay)    0  

So how do i debug this further to finally get it working?

falling back to /etc/network/interfaces or a "normal" /etc/resolv.conf is not an option.

Resources i used (plus a lot more but those are the relevant ones):

systemd Github Issue Tracker

freedesktop wiki network manager

jonathanio VPN DNS issue tracker

VPN DNS change script from jonathanio

  • 1
    The third integer is the address family (IPv4 = AF_INET = 2, IPv6 = AF_INET6 = 10). – LeBlue Mar 14 '18 at 15:50
0

the issue was happening because the network was already managed by system.

Disabling the management of systemd-resolved in the corresponding /etc/systemd/network/ file Reloading and restarting the deamons systemctl daemon-reload systemctl restart systemd-resolved made the error message Link ppp0 is managed disappear.

I figured this out by reading more, asking in the freenode #systemd irc channel ,getting some pointer help there and reading the sourcecode.

Following sets the DNS on the interface 5 to the google DNS

busctl call org.freedesktop.resolve1 /org/freedesktop/resolve1 org.freedesktop.resolve1.Manager SetLinkDNS 'ia(iay)' 5 1 2 4 8 8 8 8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.