How can I make ddclient update my dyndns address whenever NetworkManager makes or cuts a connection?
NetworkManager automatically calls scripts placed in /etc/NetworkManager/dispatcher.d with some interesting environment variables set. This is documented to some degree under man NetworkManager, but not all environment variables are explained there. I use a script like the one below, because i prefer the IP-Adress of the VPN-connection to be used on dyndns. The script also uses the last of multiple listed addresses, in the hope that it will be the most current, most important one.