D-Bus is an interprocess communication system that allows messages to be sent to various services. In this case, you want to communicate with systemd-resolved to change DNS settings on individual links instead of just gloaballyglobally with the /etc/systemd/resolved.conf
file. There are several ways to communicate with the D-Bus, from a low-level D-Bus API to higher-level bindings. But this can get a bit complicated, so we'll take advantage of a helper script for your openvpn setup to keep things as easy as possible. Within this script, the command, busctl
, is used to communicate with the D-Bus and change settings on individual links. This is more informational than useful at this point, because you won't be interacting with busctl
directly. That's not to say that you can't or won't in the future, though.
I'd also like to mention that an advantage of editing indidualindividual links instead of defining global DNS settings is that it'll allow more flexibility in the future for situations like Split DNS. I won't go into full detail here, but an explanation of Split DNS as well as routing domains and search domains can be found at these links: